Acrobat reader

Acrobat reader

Postby Enrico Maria Giordano » Thu Nov 05, 2009 11:41 am

Dear friend, the following sample opens a PDF in Acrobat Reader:

Code: Select all  Expand view
#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
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Acrobat reader

Postby arpipeline » Thu Nov 05, 2009 8:51 pm

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

Re: Acrobat reader

Postby Enrico Maria Giordano » Thu Nov 05, 2009 10:05 pm

Thank you anyway.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Acrobat reader

Postby alvaro533 » Fri Nov 06, 2009 8:53 am

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

Re: Acrobat reader

Postby Enrico Maria Giordano » Fri Nov 06, 2009 10:42 am

Are you sure that Foxit offers an ActiveX object?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Acrobat reader

Postby alvaro533 » Fri Nov 06, 2009 11:25 am

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

Re: Acrobat reader

Postby Enrico Maria Giordano » Fri Nov 06, 2009 12:19 pm

I wonder if similar documentation is available for Acrobat reader...

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Acrobat reader

Postby dutch » Sat Nov 07, 2009 6:41 pm

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  Expand view
#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)
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: Acrobat reader

Postby Enrico Maria Giordano » Sat Nov 07, 2009 7:15 pm

Try:

Code: Select all  Expand view
SETWINDOWPOS( oWnd:hWnd, -1, 0, 0, 0, 0, 3 )


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Acrobat reader

Postby alvaro533 » Sun Nov 08, 2009 8:00 pm

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

Re: Acrobat reader

Postby arpipeline » Tue Nov 10, 2009 3:39 am

Alvaro,

I am not using the ActiveX version so I don't have any experience with it...sorry.

I use the DLL version.

Andy
User avatar
arpipeline
 
Posts: 36
Joined: Thu Oct 26, 2006 5:23 pm
Location: United States

Re: Acrobat reader

Postby alvaro533 » Tue Nov 10, 2009 8:37 am

Hi Andy,

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

Thank you,

Alvaro
alvaro533
 
Posts: 206
Joined: Sat Apr 19, 2008 10:28 pm
Location: Madrid, España

Re: Acrobat reader

Postby Jeff Barnes » Sat Nov 14, 2009 1:48 am

Hi Enrico,

Maybe you can find your answer here:

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

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Acrobat reader

Postby Jeff Barnes » Sat Nov 14, 2009 2:09 am

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 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada



Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 74 guests