How to catch the information of a link when clicking it

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
eagle.zhengyi@gmail.com
User
Posts: 31
Joined: Wed Nov 07, 2018 4:41 pm

How to catch the information of a link when clicking it

Post by eagle.zhengyi@gmail.com »

Hi,

May I ask how to catch the information of a link when clicking it? The information includes destination file name, link type, target page number and etc.

Thanks.
Yi
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to catch the information of a link when clicking it

Post by Sasha - Tracker Dev Team »

Hello Yi,

When clicking on the link annotation, the action list is being executed. Before the execution the e.document.beforeRunAction event is being executed:
https://sdkhelp.pdf-xchange.com/vi ... eRunAction
You can obtain the IPXV_DocActionEvent from it, where the ActionData property stores the IPXC_Annotation (in case of the link). To check the type of the ActionData, the TriggerClass should be used - in this case, the PAEC_Link class should be specified.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
eagle.zhengyi@gmail.com
User
Posts: 31
Joined: Wed Nov 07, 2018 4:41 pm

Re: How to catch the information of a link when clicking it

Post by eagle.zhengyi@gmail.com »

Hi Alex,

Can I have a sample code for retrieving the link information when clicking on it in Delphi programming language?

Thanks.
Yi
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8436
Joined: Wed Jan 03, 2018 6:52 pm

Re: How to catch the information of a link when clicking it

Post by TrackerSupp-Daniel »

Hello Yi,

I do not believe there are any Delphi examples for this available, however you can find all sample, descriptions, and other useful tidbits from our GitHub: https://github.com/tracker-software
There are a number of Delphi examples in of both the Delphi sections, and under some of the other larger sections as well.
I hope this helps!
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
eagle.zhengyi@gmail.com
User
Posts: 31
Joined: Wed Nov 07, 2018 4:41 pm

Re: How to catch the information of a link when clicking it

Post by eagle.zhengyi@gmail.com »

Hi Daniel,

I've checked all the Delphi examples on your Github. Unfortunately, I could not find any information referenced to how to get a link's properties. Do you have any samples in any programming language for retrieving a link's information?

Thanks.
Yi
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to catch the information of a link when clicking it

Post by Sasha - Tracker Dev Team »

Hello Yi,

1) There is a sample on how to catch events in the FullDemo application.
2) There also is a code sample, on how to cast e.pEvent to the needed interface.
3) Here's an event interface description: https://sdkhelp.pdf-xchange.com/vi ... ctionEvent
4) I've explained everything else that should be done with the data, available from that interface in my previous post.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
eagle.zhengyi@gmail.com
User
Posts: 31
Joined: Wed Nov 07, 2018 4:41 pm

Re: How to catch the information of a link when clicking it

Post by eagle.zhengyi@gmail.com »

Hi Alex,

Thanks for the information. Is the code sample mentioned in "2) There also is a code sample, on how to cast e.pEvent to the needed interface." still in the Fulldemo application?

Best Regards,
Yi
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to catch the information of a link when clicking it

Post by Sasha - Tracker Dev Team »

Hello Yi,

Of course - it's on the top of the method (commented piece of code).

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
eagle.zhengyi@gmail.com
User
Posts: 31
Joined: Wed Nov 07, 2018 4:41 pm

Re: How to catch the information of a link when clicking it

Post by eagle.zhengyi@gmail.com »

Hi,

I did a test and noticed that the OnEvent() not triggered when clicked on a link. Please see the attached screenshot to confirm if I was using the correct event procedure.
PXV Control event not triggered.png
Thanks.
Yi
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to catch the information of a link when clicking it

Post by Sasha - Tracker Dev Team »

Hello Yi,

If you had watched the FullDemo application closely, you would see that the needed events are added in the IDS enum. And all of the events from the IDS enum are being registered for listening in the IPXV_Control by the https://sdkhelp.pdf-xchange.com/vi ... tListening method.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
eagle.zhengyi@gmail.com
User
Posts: 31
Joined: Wed Nov 07, 2018 4:41 pm

Re: How to catch the information of a link when clicking it

Post by eagle.zhengyi@gmail.com »

Hi Sasha,

Could you please provide a demo project to get all the information of a link when clicking on it? Once this resolved, I will purchase the PDF XChange SDK with no doubt.

Thanks.
Yi
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: How to catch the information of a link when clicking it

Post by John - Tracker Supp »

Respectfully - the Editor SDK is not for novices or those with no fundamental understanding of the PDF Structure.

You are expected to have a working knowledge of the PDF standard and specification to be able to utilize our products fully. The PDF format is exceptionally complex and we to document or 'coach' developer's in everything necessary to work with the format in the correct manner. This is beyond the scope of the support that we, or any other PDF company offering SDK's (including Adobe), provide to customers.

We have endeavoured to point you in the right direction but we cannot write detailed code on your behalf - it would be uneconomic and impractical to so.


We do NOT supply sample projects for developer's on request.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
Post Reply