How to display DlgAuthorization when using IPXC_Inst's OpenDocumentFromFile (IPXC_DocAuthCallback) to have the same UI  SOLVED

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
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

How to display DlgAuthorization when using IPXC_Inst's OpenDocumentFromFile (IPXC_DocAuthCallback) to have the same UI

Post by zarkogajic »

Hi support,

I'm opening documents from code using OpenDocumentFromFile from IPXC_Inst.

If a document is password protected I can implement IPXC_DocAuthCallback to ask the user for password.

How do I go about displaying the standard PDF-X's EU Editor dialog to ask the user for password:

image.png

I know the dialog's ID is "DlgAuthorization" but how to call / execute it?

As I want to have the same UI experience for the user.

-žarko
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: How to display DlgAuthorization when using IPXC_Inst's OpenDocumentFromFile (IPXC_DocAuthCallback) to have the same

Post by zarkogajic »

Hi support,

I've solved what I needed to solve by "op.openDoc".

The trick is not to use OpenDocumentFromFile, but the "op.openDoc" operation.

The op.OpenDoc does the same but using internal callbacks for progress and password if needed and also for conversion to PDF from other document types.

Still, out of curiosity, the question remains open: can I programmatically call that dialog (or any other I know the ID of)?

-žarko
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to display DlgAuthorization when using IPXC_Inst's OpenDocumentFromFile (IPXC_DocAuthCallback) to have the same   SOLVED

Post by Sasha - Tracker Dev Team »

Hello žarko,

It's just a simple message box with an icon and edit box specified - that's all.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to display DlgAuthorization when using IPXC_Inst's OpenDocumentFromFile (IPXC_DocAuthCallback) to have the same

Post by Sasha - Tracker Dev Team »

Hello žarko,

Yes, like the one with the File Open error that I have answered you in the different post.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to display DlgAuthorization when using IPXC_Inst's OpenDocumentFromFile (IPXC_DocAuthCallback) to have the same

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply