FormFields, JavaScript & Various Questions
Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1802
Printed Date: 24 Jan 26 at 3:45PM Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com
Topic: FormFields, JavaScript & Various Questions
Posted By: rmgdc
Subject: FormFields, JavaScript & Various Questions
Date Posted: 12 Apr 11 at 11:43AM
Hello All,
I'm currently evaluating the QuickPDF library to check if it fits my needs and I'm currently facing the following problems:
- Cannot define input masks for form fields. Is this possible? Define a numeric mask.. a date mask and so one. If not it is possible to validate input using JavaScript? Is there some code already available that I can freely use?
- I need to post the user data to a server using a formfield. Again.. is this possible using a javascript binded to a button?
I really like the product and its features (comparing with the common PDF printers outhere) but I really need the feature of sending the data to a server instead of saving it locally.
Ah.. by the way. The javascript stuff is compatible between Acrobat / Foxit versions or there are versions changes that i must be carefull about?
TYI, Rui Cruz
|
Replies:
Posted By: Ingo
Date Posted: 12 Apr 11 at 1:21PM
Hi!
Numeric and text content goes in one available formfield type. There are different type of form field (checkbox, radio, ...) but not regarding the content type.
There's a lot of JS-stuff out there having to do with content validation. Try Google with "JavaScript validate content numeric". Javascript is Javascript. This script language has nothing to do with any pdf-reader. BUT!... It's possible to deactivate JavaScript-actions in your pdf-reader to make it more safe - This could be a problem... Regarding point 2: Not a real button but you can add a clickable rectangle to your pages and you can append JavaScript-code. You should read the online reference here: http://www.quickpdflibrary.com/help/quickpdf/AnnotationsAndHotspotLinks.php
Cheers and welcome here, Ingo
|
Posted By: rmgdc
Date Posted: 12 Apr 11 at 2:17PM
Hi Ingo,
Thanks for your quick reply! Regarding the Java stuff I already have the validation code. What I didn't know if the javascript supported by the pdf's readers was a subset of javascript :)
Regarding the button stuff I understand I can code the hotspot to call a javascript but how to I do I send the data to a server? it is possible to implement a FORM action? (POST / GET) or can I implement this using a class (var Comm = ActiveXObject("...")).
Sorry for so many questions but the trial version expiricy is almost here and i'm still with doubts about what can i do with javascript and if it suits my needs (posting form data to a server).
Best regards and thank you, Rui Cruz
|
Posted By: Ingo
Date Posted: 12 Apr 11 at 6:50PM
Hi Rui!
The pdf-reader only starts the JavaScript-action and JavaScript is on your machine this has nothing to do with pdf-internal things. What is limited by the pdf-readers are the supported events (OnOpen, OnLoad, OnSave, and so on). If your trial key is expired you can explain your problems and doubts asking for a second key on the official support pages.
Cheers, Ingo
|
|