Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / April 2006

Tip: Looking for answers? Try searching our database.

Opening PDF within a Windows Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wei.Cheng - 19 Apr 2006 18:41 GMT
What is the best way doing this?

Thanks for the information.
Skandy - 20 Apr 2006 01:43 GMT
Hi:

System.Diagnostics.Process.Start("acroRd32", Application.StartupPath +
"\\" + "report.pdf");

Not sure if this is the best way though!

HTH!
Sk&y;
FUnky - 20 Apr 2006 06:08 GMT
if the question concerned 'within a form' then use a webbrowser and navigate
to the pdf.
yoga weazel - 20 Apr 2006 12:49 GMT
You can also use the Adobe Acrobat x.x  Browser Document control (activex -
acroPDF.dll).  I would definitely not use the first suggestion as it assumes
Acrobat is installed and will not display a meaningful message to the user if
it fails.  The problem with the solution below is that you are then hosting a
browser control and the browser control is then hosting a AcroPDF.PDF.1
(ProgID) control so you are actually using two controls to accomplish one
task when one of the controls is simply a container.  There is nothing wrong
with this approach necessarily but if you might be worried about performance
this could be a source of problems (probably not on most machines but it
could be).  My 2 cents.

> if the question concerned 'within a form' then use a webbrowser and navigate
> to the pdf.
Marius Horak - 20 Apr 2006 16:07 GMT
> You can also use the Adobe Acrobat x.x  Browser Document control
> (activex - acroPDF.dll).  I would definitely not use the first
> suggestion as it assumes Acrobat is installed and will not display a
> meaningful message to the user if it fails.

If files are on a local (or network) drive it's OK.
If files are on a remote server WebBrowser is better solution.

In my system I was using both, had some problems with WebBrowser and
replaced it with acroPdf but now I have to download remote files myself
and the users started to complain about the response time. Reader v7
will show the first page of some pdf files (I think PDF-1.5 or higher)
withing a second or two. If I have a big file (>50 pages) it takes
about 20 second to download the whole file. In case of 167 pages it was
more than a minute. When I was testing I was using local link to the
server so all was OK (under 4 secs).

MH
Markus - 21 Apr 2006 07:01 GMT
Hi,

> In my system I was using both, had some problems with WebBrowser and
> replaced it with acroPdf but now I have to download remote files
> myself and the users started to complain about the response time.

I have never used acroPDF.dll, but in Acrobat you can open a document
from an URL. Perhaps you can use the acroPDF.dll to open that url
internally, then it might come up with showing the first page just after
seconds and downloading the rest while viewing... but it's just a guess.

btw: displaying the first pages while downloading the rest of the pdf
document is only possible, if the pdf has been saved with the option
"optimize for webviewing".

hth
Markus
Marius Horak - 21 Apr 2006 08:37 GMT

> btw: displaying the first pages while downloading the rest of the pdf
> document is only possible, if the pdf has been saved with the option
> "optimize for webviewing".

Thanks.

MH

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.