Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Dec 07, 2019 2:19 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: PDF Viewer
PostPosted: Wed Jan 26, 2011 7:41 pm 
Offline

Joined: Tue Feb 12, 2008 6:12 pm
Posts: 51
How can I create a PDFViewer for Windows ?
First I tried:
HTMLViewer1.LoadPage destination.Child("arquivo.pdf")

It works fine on Mac, but not on Windows.
I even have the MBS DynaPDF plugin, but I don't know the best way to do it

Anyone can help ?

Thanks

Alexandre Amato
http://www.riscocirurgico.com.br

_________________
Consultório Médico
Cirurgião Vascular


Top
 Profile  
Reply with quote  
 Post subject: Re: PDF Viewer
PostPosted: Thu Jan 27, 2011 2:51 am 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
The first version of DynaPDF 3 with renderer is expected to be released in March.
Please understand that this takes time as we have to basicly recreate half of Acrobat Reader ourselves.

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
Reply with quote  
 Post subject: Re: PDF Viewer
PostPosted: Tue Feb 08, 2011 10:26 am 
Offline

Joined: Fri Sep 30, 2005 1:53 pm
Posts: 914
Location: Philadelphia, PA
Thanks to griffitts and KarlO, in the past I've used this code not only to view a specific PDF file, but also to look at a specific page in the PDF file:

Dim S as new Shell
Dim QuoteChar as String=Chr(34)
Dim Command as String="*C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe* /A *page=7=OpenActions* *C:\example.pdf*"
S.Execute ReplaceAll(Command,"*",QuoteChar)+EndOfLine.Windows

Let me know how it works for you.

Barry Traver


Top
 Profile  
Reply with quote  
 Post subject: Re: PDF Viewer
PostPosted: Tue Feb 08, 2011 10:46 am 
Offline

Joined: Sat Aug 22, 2009 9:44 am
Posts: 315
Barry, the problem with that is if the absolute path to adobe reader is bad, you'll end up with nothing. Of course, you could always just do folderitem.launch to open the pdf file, but I think the OP wants his program to render the PDF.

One way you can (kind of) do that is to create a form with an htmlviewer in it, then load the pdf into the htmlviewer. If the user has reader installed, it'll show it like it would in a regular web browser. Unfortunately, you'd run into a problem if they don't have reader installed, or if there are compatibility issues with their version of reader and your version of the htmlviewer control.

Bill


Top
 Profile  
Reply with quote  
 Post subject: Re: PDF Viewer
PostPosted: Tue Feb 08, 2011 12:08 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
You can use the FindExecutable and ShellExecute API to find the user's pdf viewer and launch it.


Top
 Profile  
Reply with quote  
 Post subject: Re: PDF Viewer
PostPosted: Tue Feb 08, 2011 1:49 pm 
Offline

Joined: Fri Nov 16, 2007 10:18 pm
Posts: 195
Location: Portland, OR
If you don't want to use the API you can get the default program for any file type but just issuing the following two commands:

C:\>assoc .pdf
.pdf=AcroExch.Document

C:\>ftype acroexch.document
acroexch.document="C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe" "%1"

_________________
Windows: Win7 64bit sp1, Vista 32bit sp2, WinXP 32bit SP3
Linux: RH EL6
Mac: Died in 2011 and took 2 months to notice.

RealStudio: 2012r2


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group