I'm in the middle of replacing Adobe Acrobat Pro by Foxit PhantomPDF. The development environment is PowerBuilder (12.6 or 2017R3). In PowerBuilder, "AcroExch.PDDoc" is called to connect to Adobe Exchanger so that two PDF files can be combined. How to combine PDF's in PowerBuilder codes by using Foxit PhantomPDF? Thanks!
Announcement
Collapse
No announcement yet.
"AcroExch.PDDoc" equivalent or how to combine PDF's in PowerBuilder codes?
Collapse
X
-
Jeffcanada
I've submitted a Report Ticket to check your request internally with our engineer. The Report ID#: PHANTOM-12386. I'll update here once I got the update on this inquiry. Thank you.
BTW, if you could use your phone or use the LiceCap tool to generate an animated gif that shows how you call the "AcroExch.PDDoc" is called to connect to Adobe Exchanger to combine PDF documents on your side then I could also update the procedure video to PHANTOM-12386 for processing reference.Here's the download link of LiceCap tool if needed:
http://sync-us.foxitsoftware.com/iss/Tools/LICEcap.zip
(Unzip it, then double-click on licecap file, you can then specify the recording area then hit "Record", it requires naming the file first then start recording.)
Thank you.
- Likes 1
-
cherry
Thank you for the reply. The simplified codes are listed below.
To use Adobe:
protected:
CONSTANT string is_ADOBE_DOC_CLASS = "AcroExch.PDDoc"
CONSTANT long il_ADOBE_DOC_SAVE_TYPE = 1
CONSTANT long il_ADOBE_DOC_INSERT_BEFORE = -1
CONSTANT long il_ADOBE_DOC_INSERT_FROM_START = 0
CONSTANT boolean ib_ADOBE_DOC_INSERT_BOOKMARKS = FALSE
oleobject ole_pdf_source, ole_pdf_target
ole_pdf_source = Create OLEObject
ole_pdf_target = Create OLEObject
ll_CreateCode = ole_pdf_source.connecttonewobject(THIS.is_ADOBE_DO C_CLASS)
ll_CreateCode = ole_pdf_target.connecttonewobject(THIS.is_ADOBE_DO C_CLASS)
lb_RetCode = ole_pdf_target.Open(as_PDFFileInsertingIntoFrontOf )
lb_RetCode = ole_pdf_source.Open(as_PDFFileToInsertAtFront)
lb_RetCode = ole_pdf_target.InsertPages(THIS.il_ADOBE_DOC_INSER T_BEFORE, ole_pdf_source, THIS.il_ADOBE_DOC_INSERT_FROM_START, ole_pdf_source.GetNumPages(), THIS.ib_ADOBE_DOC_INSERT_BOOKMARKS)
Similarly, I tried the following with Foxit Phantom.
// Foxit PhantomPDF
CONSTANT string is_FOXIT_DOC_CLASS = "PhantomPDF.Creator"
CONSTANT int ii_COMBINE_ADD_CONTENTS = 2 //enum 0x02
oleobject ole_pdf
ole_pdf = Create OLEObject
l_CreateCode = ole_pdf.connecttonewobject(THIS.is_FOXIT_DOC_CLASS )
l//Syntax - SHORT CombineFiles(BSTR bstrFiles, BSTR DestPDFFile, SHORT uCombineFlags);
li_rtn = ole_pdf.CombineFiles("C:\CombimePDFs\hello.pdf|world.pdf","C:\CombimeP DFs\HelloWorldFoxit.pdf",ii_COMBINE_ADD_CONTENTS)
The error message is:
Application terminated.
Error: Error calling external object function.
I installed Foxit PhantomPDF and copied fsdk.dll to the application directory.
Is "PhantomPDF.Creator" the correct object to call?
Is "CombineFiles" called correctly?
What value of COMBINE_ADD_CONTENTS should be used?
Comment
-
Jeffcanada
Updated the info to Report ID#PHANTOM-12386. I'll keep you posted here and email you as well when there's further update. Thank you.
Comment
Comment