We have a complex form that we created as a PDF. We want users to be able fill out the PDF and then either print it out and mail it in or click a Submit button and have it emailed to the client. What's the best way to do this?
I understand that we can attach javascript to the Submit button on the form. I'm thinking we could use Javascript to submit the form to the website and then write a REST type page that would handle emailing the PDF to the appropriate place. We are using ASP.NET/DotNetNuke on the backend of the site.
Dave,
You have a few options on this but a lot of it is going to be depending on how you want the user to handle input.
If you want the user to fill the ACTUAL PDF themselves, then you have a lot less control. But it can submit to a location and go from there, but saving it as a modified filled PDF requires either licensing for the document, OR for the users to have the full version of acrobat.
Another option is for you to build an input form for the user, then fill the PDF and commit the information, then either send them the file if they want to print or e-mail it off yourself.
I've done both in the past for previous clients/jobs. Feel free to ping me directly with a bit more detail if this doesn't help.
Edit - More detail based on comment
In this situation you have a few options.
Actually it looks like you can get to part of this now via the PDF create process - http://help.adobe.com/en_US/Acrobat/9.0/Standard/WS58a04a822e3e50102bd615109794195ff-7e0d.w.html
From a server side sending you have a few options. They can save it and upload it, which isn't best.
You can have a form post action, this will submit their answers to your server, you could then plug them into a PDF, save it, then forward it on
In the end it will depend on the true workflow.
Have you considered this SaaS? http://www.pdfescape.com/what/publishing/
Related
I am attempting to autofill a form on a website that I don’t have access to change. Digging around the pages source info, I’ve figured out the form is a WordPress Contact 7 form. One of the text boxes is "c-referred-by". I would like to have someone click on a link from my HTML email signature, and have it autofill my first and last name in this “Referred By” field.
I have been trying to use a GET request through the URL. Syntax of the URL I tried is as follows:
http://www.example.com/apply?c-referred-by=First+Last
I can tell the word press site is receiving the data, as when I inspect it, I can see my First Last name listed in the source, but the page doesn’t display the text for the user to see in the box. I have found ways to do this if I have access to the Server-side WordPress page, but I don’t.
Because this is in an email signature, I need to avoid anything but HTML in the signature as most email clients will not display JScript or PHP, and if they do they will be suspicious, and either strip the code or it may get caught in a SPAM filter.
I feel I will need to have an intermediary page between the email signature and the webform that can fill the information into, say a cookie, or some other recallable data system, then that page redirects to the page with the form, and populates it.
Flow of data image
I’m just not sure how to go about this?
Is there a better way I am not familiar with?
Thank you for your help in advance!
Could you please try to direct me which way should I be aiming in order to achieve the following high level requirement related to creating a fillable PDF for a user. The user can open this PDF, change some content, save the PDF, send it back to us via email and our system will parse the content and upload it to a database.
basic steps:
- the user clicks on a web button and the system behind this online web application sends an email to the user with a PDF document having all details from the user's saved application, e.g. full name, postcode, dob, answers to some questions (tickboxes), free text comments area
- the user opens this PDF, changes some details e.g. updates text in the comments area, unticks some check boxes, changes post code
- the user saves the changes and sends the PDF back to us.
- the system reads the PDF, parses the content and updates the data in a database.
Is the above possible? If so, please try to advise which technology can be used.
Thank you.
As mentioned in the other message, why send the filled PDF back? (well, unless you need a digitally signed version for your records).
Instead use the Submit function of PDF/Acrobat, which submits just the data. This is possible (among other ways) using HTML POST, and therefore working as if the data were sent by a HTML form. Updating the database should not be a big deal anymore in this case.
If you have to insist on sending back a filled form, there are AFAIK utilities which can extract the form data, and then, again, updating the database should not be difficult.
I don't really understand why you want to email a PDF for a user to fill out and then try to parse it in the first place? Why not just make some sort of web app that prints nicely for this?
If you really need a PDF, you might want to design your form in TeX and use something like this example.
I need to create a application that needs to get information from the user using HTML text fields and fill-it to PDF fields. The fill-able PDF can be obtained from the server. The data filled in by the user cannot be submitted to the server (Sensitive information / legal problems). I need a way in which the JavaScript can take the information filled by the user, and fill it to the PDF, and make it available for the user to print/download.
(Initially, I tried to to just have HTML+PRINTCSS and avoid using a PDF, but then I had the issue of headers added by browsers to HTML that is printed. I don't want the worry the user to check his browser print settings - as most of them are computer illiterate)
I don't think this is doable via JavaScript alone. Some PDF readers do support JS, but many do not or allow the user to toggle it, and even then the PDF wouldn't have access to variables in the browser window. You'd be better off pre-filling the fields serverside. PHP in particular has robust PDF handling available out of the box.
You could, for instance, let the user fill in the form online - the "Print" button could use AJAX to submit the form to the server, and point the window at the resulting PDF download link. You could also simply submit the form without JavaScript, and let the server handle the redirection by setting the header.
I'm new to web programming, so I need some help.
I am writing a custom file-creation app for my site. A user visits the page, clicks on some various options and toggles some checkboxes, and the presses a 'download now' link.
I have a PHP backend which will be processing the submission, and generating a PDF file. After the user presses the download link, I want the download to start like it would for any static link.
My question is: What is the best way to do this? From my limited understanding, I have a choice between using AJAX or somehow using forms to submit the data. What are the advantages/disadvantages of each? Does anyone have any good links to examples?
Thanks
Actually you cannot download a pdf via XMLHttpRequest (AJAX).
In general you should simply redirect the user to the resource that will generate the PDF with the proper MIME type, and then leave it up to the browser to figure out how to handle it.
AJAX will not work here, because you cannot use AJAX to download the file.
Instead, you should make a normal form, and have the PHP backend serve a file download when the form is submitted.
Just use a form. Ajax provides no benefits and a lot of complications under these circumstances. (You could use it, although you would have to use a non-XHR implementation, but it would be pointless to do so)
Based on my Google and stackoverflow search I'm guessing there are no library for this purpose.
The goal is: store some blank forms on my server. Then present these to the user, who edits the form in the browser with Javascript and submits the form back to the server.
The client wants to reuse parts of an old system (the forms) in which users would download an editable PDF, edit it, and email it back to a secretary. Our users aren't very computer savvy and many don't realize they need to email the forms back, assuming instead the forms somehow get submitted when they save their local changes (or something).
I haven't seen the forms yet, so I cannot assess the viability of an alternative.
I don't know of any Javascript libraries but you can use the FDF/XFDF files to do something like this. The idea is that you basically link your PDF file to an external FDF or XFDF (XML version) file. When the PDF is downloaded, so is the associated FDF/XFDF file. You place form fields on the PDF (which it sounds like already exist). They fill that information in and (if you add a button to the PDF form) click on the button which basically does a POST back to the server with these fields.
At that point you can save them to a database, merge them with a PDF, etc.
BTW - the XFDF/FDF files aren't really necessary to just fill in a form. You would only need them if you want to be able to display a PDF that has form fields and to fill those form fields in automatically. If you are always displaying a blank PDF for them to fill in you can get away with just adding a button which posts back to the server.
How about editing the PDF forms to add a submit button?
http://help.adobe.com/en_US/Acrobat/8.0/Professional/help.html?content=WS3593E0A4-C5E2-4cde-A09E-2A984346DDD2.html