Page 1 of 1
Acrobat reader
Posted: Thu Nov 05, 2009 11:41 am
by Enrico Maria Giordano
Dear friend, the following sample opens a PDF in Acrobat Reader:
Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oWnd, oPdf
DEFINE WINDOW oWnd
oPdf = TActiveX():New( oWnd, "AcroPDF.PDF" )
oPdf:LoadFile = "E:\FW\Update43-29-sera.pdf"
oWnd:oClient = oPdf
ACTIVATE WINDOW oWnd;
MAXIMIZED
RETURN NIL
Anybody knows how to open a password protected PDF without user intervention (the program knows the password)?
Thanks in advance.
EMG
Re: Acrobat reader
Posted: Thu Nov 05, 2009 8:51 pm
by arpipeline
Enrico,
This doesn't answer your question exactly, but I use a great library for all kinds of PDF related work, and it definitely allows you to open a secured PDF with ease. You can then resave it with new options or do all kinds of cool stuff. Also, I use the Sumatra PDF reader for super fast display of PDF files.
Check it out:
http://www.quickpdflibrary.com
http://blog.kowalczyk.info/software/sumatrapdf
Andy
Re: Acrobat reader
Posted: Thu Nov 05, 2009 10:05 pm
by Enrico Maria Giordano
Thank you anyway.
EMG
Re: Acrobat reader
Posted: Fri Nov 06, 2009 8:53 am
by alvaro533
Good morning.
DEFINE WINDOW oWnd
oPdf = TActiveX():New( oWnd, "AcroPDF.PDF" )
oPdf:LoadFile = "E:\FW\Update43-29-sera.pdf"
I use Foxit freeware instead of Acrobat Reader. While Acrobat reader is bigger than 70 mb, Foxit is only 5 mb and much, much faster to load and to open files. Intregration with Firefox is also better than acrobat. Also I don't like that acrobat reader is looking for upgrades all the time. So my question is: What do I have to put to replace "AcroPDF.PDF" in you code above.
Thank you very much.
Alvaro
Re: Acrobat reader
Posted: Fri Nov 06, 2009 10:42 am
by Enrico Maria Giordano
Are you sure that Foxit offers an ActiveX object?
EMG
Re: Acrobat reader
Posted: Fri Nov 06, 2009 11:25 am
by alvaro533
Yes, I just found out:
http://www.foxitsoftware.com/pdf/sdk/activex/
http://foxit.vo.llnwd.net/o28/pub/foxit ... _guide.pdf
The reader is freeware, but the ocx is not, I think. I will try it.
Alvaro
Re: Acrobat reader
Posted: Fri Nov 06, 2009 12:19 pm
by Enrico Maria Giordano
I wonder if similar documentation is available for Acrobat reader...
EMG
Re: Acrobat reader
Posted: Sat Nov 07, 2009 6:41 pm
by dutch
Dear All,
This function is useful. How can I make it on Top of Window Backgroup? Because when I use this function from the Main window, it will be minimized.
Enrico Maria Giordano wrote:Dear friend, the following sample opens a PDF in Acrobat Reader:
Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oWnd, oPdf
DEFINE WINDOW oWnd
oPdf = TActiveX():New( oWnd, "AcroPDF.PDF" )
oPdf:LoadFile = "E:\FW\Update43-29-sera.pdf"
oWnd:oClient = oPdf
ACTIVATE WINDOW oWnd;
MAXIMIZED
RETURN NIL
Anybody knows how to open a password protected PDF without user intervention (the program knows the password)?
Thanks in advance.
EMG
Regards,
Dutch
Re: Acrobat reader
Posted: Sat Nov 07, 2009 7:15 pm
by Enrico Maria Giordano
Try:
Code: Select all
SETWINDOWPOS( oWnd:hWnd, -1, 0, 0, 0, 0, 3 )
EMG
Re: Acrobat reader
Posted: Sun Nov 08, 2009 8:00 pm
by alvaro533
Andy, can you show how you inicialize the activex control with quickpdflibrary?
I get an error with:
::oControl := TActiveX():New( oWnd, "QuickPDFAX0717.PDFLibrary" ) // crash
Thank you very much
Alvaro
Re: Acrobat reader
Posted: Tue Nov 10, 2009 3:39 am
by arpipeline
Alvaro,
I am not using the ActiveX version so I don't have any experience with it...sorry.
I use the DLL version.
Andy
Re: Acrobat reader
Posted: Tue Nov 10, 2009 8:37 am
by alvaro533
Hi Andy,
Could you share the code of an example on how to get started with the DLL ?
Thank you,
Alvaro
Re: Acrobat reader
Posted: Sat Nov 14, 2009 1:48 am
by Jeff Barnes
Re: Acrobat reader
Posted: Sat Nov 14, 2009 2:09 am
by Jeff Barnes
Hi Enrico,
I found this while searching the net:
>To programmatically enter a password and bypass the user
>interface prompt for
>password, you must replace the standard "security handler" for
>Acrobat with your own
>security handler. There is no way to bypass the password prompt with
>the standard
>Acrobat security handler. For an example of a custom security
>handler, see the "Rot13"
>sample plug-in.
Looks like this "Rot13 Sample Plug-in" is supplied with Acrobat 4 SDK
Hope this helps.
Re: Acrobat reader
Posted: Sat Nov 14, 2009 10:55 am
by Enrico Maria Giordano
Thank you.
EMG