Use Author and Title of PDF File in a dynamic stamp

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
jorgenseleit
User
Posts: 3
Joined: Fri Dec 30, 2022 9:09 am

Use Author and Title of PDF File in a dynamic stamp

Post by jorgenseleit »

I tried to create a dynamic stap which shows fields with the author and the title of the document but did not get the solution.

The Java script I tried

util.printd=this.info.title;

Probably "this" is the formular and not the doucment, why it is not working?

Any solution recommendations?
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Use Author and Title of PDF File in a dynamic stamp

Post by Tracker Supp-Stefan »

Hello jorgenseleit,

"this" means "current document" in your JS code, but the issue is not there.
The issue is that "util.printd" means "please use the utility tool for print date" - so that can only be used for date output, not for author output.

If you separate the two - you will get results like these:
image.png
Can I have a copy of the stamp file you have created so far?
I should be able to modify it for you to make the two fields in it take the desired values.

Kind regards,
Stefan
jorgenseleit
User
Posts: 3
Joined: Fri Dec 30, 2022 9:09 am

Re: Use Author and Title of PDF File in a dynamic stamp

Post by jorgenseleit »

Thank your for the information.
Dynamic Stamp.pdf
Stamp (not working correctly)
(685.16 KiB) Downloaded 50 times
Date is working.

But I created a text formular field and want to set the value with the document title. (.. and a nother field with the author)
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Use Author and Title of PDF File in a dynamic stamp

Post by Tracker Supp-Stefan »

Hello jorgenseleit,
Updated Dynamic Stamp.pdf
(685.16 KiB) Downloaded 48 times
Thanks for the file.

You will need to use

Code: Select all

event.value = event.source.source.info.title; 
for the field for which you want to display the Author name:
image.png
Kind regards,
Stefan
jorgenseleit
User
Posts: 3
Joined: Fri Dec 30, 2022 9:09 am

Re: Use Author and Title of PDF File in a dynamic stamp

Post by jorgenseleit »

I Managed it now with following solutions

"event.value = event.source.source.info.title; "
To Put the document titel in the formular field

and
"event.value = event.source.source.info.author; "

to put the author in the formular fieald of the stamp.

Thanks for your Help :D
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Use Author and Title of PDF File in a dynamic stamp

Post by Tracker Supp-Stefan »

Hello jorgenseleit,

Glad that you managed to get it working!

Kind regards,
Stefan
Post Reply