javascripts in PDF

A picture is worth a thousand words. We have created some pdfs tutorials showing common tasks.

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

Post Reply
luis ferreira
User
Posts: 4
Joined: Sat Oct 20, 2012 7:42 pm

javascripts in PDF

Post by luis ferreira »

Hi
I've created a PDF invoice withe PDF-XChange Viewer Pro and need a box to sum, automatically, the total of € in the different boxes of the items.
Is it possible to ad a javascript to that box using PDF-XChange Viewer Pro 2.5.211?
If sou how can I do it?
Regards
Luis
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: javascripts in PDF

Post by Ivan - Tracker Software »

Using the Viewer you cannot create form field, so, if you do not have form fields in your document, I'm afraid it cannot be done.

The Viewer doesn't allow to modify properties (including actions) for a form fields, but you can modify them using JS via JS console (Ctrl+J shortcut).
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
luis ferreira
User
Posts: 4
Joined: Sat Oct 20, 2012 7:42 pm

Re: javascripts in PDF

Post by luis ferreira »

OK
Normally I use Scribus for this purpose, but always get huge PDf documents!
So, I'm looking for a alternative.
Thank you.
Best regards
Luís

P.S.
(of topic) Any news about a Android version of the DF-XChange Viewer :wink:
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6829
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: javascripts in PDF

Post by Paul - Tracker Supp »

Hi Luis,

as to your question about Android, it's still being discussed but it is still a long way off I'm afraid.
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
luis ferreira
User
Posts: 4
Joined: Sat Oct 20, 2012 7:42 pm

Re: javascripts in PDF

Post by luis ferreira »

Ok I'll keep waiting.
Thanks
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6829
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: javascripts in PDF

Post by Paul - Tracker Supp »

:)
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
cj_helpdesk
User
Posts: 1
Joined: Tue Aug 23, 2016 4:06 am

Re: javascripts in PDF

Post by cj_helpdesk »

Hello,

I am trying to create a dropdown calendar in pdf xchange pro version 6. Is it possible to import a javascript that will do this for the version that I have?

Thanks for your help.
Willy Van Nuffel
User
Posts: 2347
Joined: Wed Jan 18, 2006 12:10 pm

Re: javascripts in PDF

Post by Willy Van Nuffel »

I think I found something interesting for you ...

http://www.pdfscripting.com/public/Free ... lendar.pdf

You can download this PDF,
by doing a right mouse click on the URL/hyperlink and click "Save Target As" (IE11) or "Save Link As" (Google Chrome).

Take care: I do not know if you can use or copy the code for free ...
I would say, that is up to you to verify ...
In either case, you can probably learn something from it ...

You can see the Javacode (when the PDF is opened) via File > Document Properties > JavaScript
To view the Javacode that is connected with the datepicker-form-object(s), you have to click the "Edit Form" icon and then look into the properties of that object, at Actions > Mouse Up, where you can click "..." besides "Run a JavaScript".

Best regards.
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6829
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: javascripts in PDF

Post by Paul - Tracker Supp »

Thanks for that Willy,

cj - did you get this sorted or are you still looking for help?
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Post Reply