|
using System.Windows.Forms;
namespace AcrobatViewerMvvm
{
public partial class PdfViewer : UserControl
{
private string pdfFilePath;
public PdfViewer()
{
InitializeComponent();
acrobatViewer.setShowToolbar(false);
acrobatViewer.setView("FitH");
}
public string PdfFilePath
{
get
{
return pdfFilePath;
}
set
{
if (pdfFilePath != value)
{
pdfFilePath = value;
ChangeCurrentDisplayedPdf();
}
}
}
public void Print()
{
acrobatViewer.printWithDialog();
}
private void ChangeCurrentDisplayedPdf()
{
acrobatViewer.LoadFile(PdfFilePath);
acrobatViewer.src = PdfFilePath;
acrobatViewer.setViewScroll("FitH", 0);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.