displaying PDF files embedded in windows forms

  • Thread starter Thread starter TheTruth
  • Start date Start date
T

TheTruth

Hello,

I need to be able to display PDF files just as jpeg, tiff, and gif files can
be shown embedded in the PictureBox control. The PictureBox control does
not support the PDF format.

I know something about ActiveX documents embedded, but am relatively new to
windowsforms. Your guidance will be much appreciated. Thanks.
 
Adobe Acrobat has an ActiveX control which you can use in your app. To use
this control:
1) Right click on the toolbox and choose Add/Remove items.
2) Choose the COM Components tab
3) Select the "Acrobat Control for ActiveX"
4) Click Ok
5) Drag the new control to your form.

To load a PDF file:
AxPdf1.LoadFile("C:\test.pdf")

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
 
You can use Microsoft Web Browser Control. This is
ActiveX Control which you can use to navigate to some
urls. Some articles about How To Use Web Browser you can
find on www.msdn.microsoft.com and in the KB of microsoft.
Of course there is an ActiveX Control for Files in PDF
format, but if you want to open some files from Microsoft
Office too, the good way is to host Web Browser Control
in your application. Use the simple method to navigate to
the document:

MyWebBrowserControl.Navigate
("http://www.mypage.com/PDF/MyPdfFile.pdf")

or

MyWebBrowserControl.Navigate
("http://www.mypage.com/DOC/MyDocFile.doc")

In this way the Microsoft Web Browser Control load
correctly ActiveX with Viewer for your files.

Also you can use it to view files with 3D space in VRML
format (don't forget that this files are in text format
so you can generate it dynamically), but first you must
install Cosmo Player!!!
 
Back
Top