[LIN-4983-support] PDF-XChange Editor SDK

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
Jack Tseng
User
Posts: 11
Joined: Fri Feb 15, 2019 3:11 am

[LIN-4983-support] PDF-XChange Editor SDK

Post by Jack Tseng »

Dear team,
Good day!

Our customer have some questions may need your help:
We have some questions with AxPXV_Control from PDF-XChange Editor SDK in version 7.0.327.1. Please request following questions

1. When I open XFA document, it shows below warning message. So I want to ignore XFA type before showing on the AX control.
https://imgur.com/9mCbtqW

How could I know It is a XFA document when I open pdf before showing on the AX control? I found https://sdkhelp.pdf-xchange.com/vi ... DFFormType, but I don't know which function can this information. Could you give some information how to get pdf type.

And I have tried to Ignore XFA when I open file form https://sdkhelp.pdf-xchange.com/vi ... tOpenFlags.
But when I use sample code from https://sdkhelp.pdf-xchange.com/vi ... t_optimize, I got 0 from Str2ID("op.document.optimize", false). And then I have exception when I creareOp on the next step. Do I have set something before? Could function "OpenDocumentFrom" Ignore XFA type?
https://imgur.com/loZBnAS
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: [LIN-4983-support] PDF-XChange Editor SDK

Post by Sasha - Tracker Dev Team »

Hello Jack Tseng,

I don't think that it's a correct way to use every method and enum that has XFA in it. I do not see at all, why you would need the Optimize Operation to open the document.
The PXC_PDFFormType enum is used in the IPXC_AcroForm::Type property that you can see in the See Also section. By navigating there, you would have found the IPXC_AcroForm interface that is used here (also from the See Also section): https://sdkhelp.pdf-xchange.com/vi ... t_AcroForm
What you will have to do is to open the document with the IPXC_Inst. Then you will have the IPXC_Document available. Then check the AcroForm validity with this method(as described above):https://sdkhelp.pdf-xchange.com/vi ... asAcroForm
If it's invalid - then it's a no XFA document and you can do the pdfCtl.OpenDocFrom(IPXC_Document) to open this document in the Control.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply