Windows Develop Bookmark and Share   
 index > Windows Forms General > PDF in a web browser control
 

PDF in a web browser control

I have a pdf i used to generate by using Sharp PDF. i need to load it in a web browser control. is it possible?
kcauchi  Tuesday, April 15, 2008 11:09 AM

Hi kcauchi,

I do not think to open a PDF file in a WebBrowser control is a really good idea, for the WebBrowser control would not ensure to open the PDF file properly.

I want to recommend you to use the Adobe Acrobat Control for ActiveX to load the PDF file, you can drag and drop the ActiveX control to your C# windows form in the design mode from the Toolbox, and then you can load the file like the following code snippet.

Code Snippet

"E:\\C#.pdf");

Regards,

Xun

Xun Ye  Friday, April 18, 2008 2:40 AM

I'm not aware of any ASP.NET PDF Viewer controls off the top of my head, but are you sure you need one? Most users these days will have a browser plugin for displaying PDF files - why not try streaming the PDF file straight back to the browser? For users without a plugin, you can provide a link to Adobe Acrobat.

CjBGB  Tuesday, April 15, 2008 12:38 PM

web browser control meaning its windows not web

kcauchi  Tuesday, April 15, 2008 12:46 PM
AnanthR  Tuesday, April 15, 2008 12:48 PM

Hi kcauchi,

I do not think to open a PDF file in a WebBrowser control is a really good idea, for the WebBrowser control would not ensure to open the PDF file properly.

I want to recommend you to use the Adobe Acrobat Control for ActiveX to load the PDF file, you can drag and drop the ActiveX control to your C# windows form in the design mode from the Toolbox, and then you can load the file like the following code snippet.

Code Snippet

"E:\\C#.pdf");

Regards,

Xun

Xun Ye  Friday, April 18, 2008 2:40 AM

You can use google to search for other answers

Custom Search

More Threads

• Textbox displaying all text
• Dragging images source code?
• Outlook EMail Synchronization
• Listbox selecteditem
• Layering problems with MDI subwindows
• Printing in Win 9X
• reorder listview based on Tag
• modularizing form code
• Media Player with no UI and Closed captions in Fullscreen mode.
• add reference to ocx in IDE vs aximp.exe