0

I'm using PDFCreator 2.1 COM object to display PDF files inside my Window Form. So far I added the control to Form. But I can't find a way (method or property) of this object ( AxCPDFActiveDoc ) to open the file. I know, some time ago, acrobat reader had once in their SDK a object that did that for us. The property called "src". But in this I cannot find anything related.

pdfViewer = new AxCPDFActiveDoc();
pdfViewer.Height = this.Height - this.ficheiroBindingNavigator.Height - this.ficheiroBindingNavigator.Top - 25;
pdfViewer.Top = this.ficheiroBindingNavigator.Height - this.ficheiroBindingNavigator.Top;
pdfViewer.Left = Convert.ToInt32(this.Width * 0.2) - 50;
pdfViewer.Width = Convert.ToInt32(this.Width * 0.5);
this.Controls.Add(pdfViewer);

I have searched here http://docs.pdfforge.org/pdfcreator/latest/en/com-interface/ but nothing really related to ActiveX on Windows Forms.

int3
  • 658
  • 1
  • 5
  • 21

1 Answers1

1

Try another library: pdfium.net sdk for example

You can install it through nuget Install-package pdfium.net.sdk

Next place the control on form and use somthing like folow:

//Open and load a PDF document from a file.
pdfViewer1.LoadDocument(@"c:\test001.pdf");

to show PDF document

Roman
  • 19
  • 1