Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support


All forums · Statistics · Search ·

Two Pilots forum / For software developers / Calculating fields in PDF
Author Message
Jim
# Posted: 27 Nov 2006 14:24


Hi,

I have created a PDF form with PDF Creator. I was wondering if I could create fields that will calculate as data is entered. If so, how can I do this.

Thank You.

Jim

Stanislav
Member
# Posted: 28 Nov 2006 08:19


Dear Jim,

You can do this using JavaScript.

For example, you can attach action, created by CreateJavascriptAction to PDFANNOTATION_OnChange of all data fields, in this action collect all values and put calculated data to the result field.

You need to read additional information about Acrobat JavaScript, for example here:
http://www.planetpdf.com/codecuts/pdfs/tutorial/Ac roJS.pdf

Actions reference you can find in library documentation in "Actions" section. Also, i recommend to read "Working with annotations".

The requested example will be added as soon as possible.

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Jim
# Posted: 28 Nov 2006 09:01


Thank You.

Jim
# Posted: 28 Nov 2006 12:16


Hi,

I have gotten a javascript to execute but, I am not familiar enough with javascript in PDF to get a field to update. Can some please give me sample code that works. I am performing this is ASP.

Thank You.

Stanislav
Member
# Posted: 28 Nov 2006 12:48


Dear Jim,

I'll prepare example soon, and post link to download here. I hope it'll be available tomorrow.

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Stanislav
Member
# Posted: 1 Dec 2006 03:25


Dear Jim,

Please download example PDF and VBS here:
http://www.colorpilot.com/~spanasik/JSCalculation. zip (1.5 Kb)

Also i recommend you to read Acrobat JavaScript Scripting Guide
http://www.adobe.com/devnet/acrobat/pdfs/AcroJSGui de.pdf

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Jim
# Posted: 4 Dec 2006 08:54


Thank You Very Much.

I was able to get it to work now.

Jim

 

 

Powered by miniBB 2.0 RC7 © 2001-2004 Page creation time (sec.): 0.015

 

Page top