Acrobat reader

Post Reply
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Acrobat reader

Post 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
User avatar
arpipeline
Posts: 36
Joined: Thu Oct 26, 2006 5:23 pm
Location: United States

Re: Acrobat reader

Post 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
alvaro533
Posts: 179
Joined: Sat Apr 19, 2008 10:28 pm
Location: Madrid, España

Re: Acrobat reader

Post 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
alvaro533
Posts: 179
Joined: Sat Apr 19, 2008 10:28 pm
Location: Madrid, España

Re: Acrobat reader

Post 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
User avatar
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: Acrobat reader

Post 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
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
alvaro533
Posts: 179
Joined: Sat Apr 19, 2008 10:28 pm
Location: Madrid, España

Re: Acrobat reader

Post 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
User avatar
arpipeline
Posts: 36
Joined: Thu Oct 26, 2006 5:23 pm
Location: United States

Re: Acrobat reader

Post 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
alvaro533
Posts: 179
Joined: Sat Apr 19, 2008 10:28 pm
Location: Madrid, España

Re: Acrobat reader

Post by alvaro533 »

Hi Andy,

Could you share the code of an example on how to get started with the DLL ?

Thank you,

Alvaro
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: Acrobat reader

Post by Jeff Barnes »

Hi Enrico,

Maybe you can find your answer here:

http://www.adobe.com/devnet/acrobat/?view=documentation
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: Acrobat reader

Post 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.
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
Post Reply