web based form to collect data and populate to a fillable PDF - pdf

Is there a script that anyone can suggest that would allow me to create a HTML or PHP web based form to collect data and save that data. the call the data to be populated in a fillable pdf?

If you have an existing PDF that you want to populate, and that PDF just has text fields (no checkboxes or radio buttons) then CAM::PDF may be able to help you. You can use it as a Perl library directly, or use its command-line interface. CAM::PDF is not useful for generating PDFs from scratch, however. Furthermore, if you have embedded fonts, then you need to ensure that all of the characters you plan to insert are represented in the embedded font.

Use a normal web page to get the data. If not sure how to do it, look for "php forms" on google, there are plenty of tutorials.
Then use a php pdf generator, like this one, to create the PDF file. If you look hard enough, you will probably find a pdf generator that will let you use a template with placeholders where the entered data should be.

Related

Is there a recommended workflow to automate producing PDF forms with embedded javascript?

We use a lot of PDF forms with embedded javascript. We generate PDFs from LibreOffice, then use Acrobat to add PDF controls and javascript. This isn't working well, because a change to the appearance of the form in LibreOffice then causes additional work in Acrobat to put the PDF controls back where they should be, and then re-do the javascript.
Is there a smart way to generate PDFs with the PDF controls built-in (text input boxes, check boxes, radio boxes, digital signature boxes), with all the javascript included in the source file?
For example, is there a tool that could convert an html form with embedded javascript into a PDF with the same javascript running in the PDF?
I have a two step process.
First, create the PDF using Adobe InDesign. InDesign can add PDF interactive PDF fields to your document so that when exported, the fields are present.
The second step is to use a script to add scripted actions to each field like this...
this.getField("foo").setAction("MouseUp", "app.beep(0);");
See the documentation for more actions.

Can form field data be saved in PDF?

I am learning the basics of form pdfs now. After entering the field values, I can save the pdf with data as a pdf file. With Acrobat pro, I am able to export data in FDF and XFDF files. we need to develop a website that will allow users to fill a few form pdfs in browser and download it preferably as pdf forms filled with data. The PDFTron is a good solution, but it looks like I can download FDF file or XFDF file or the flattened pdf from it. The user should be able to modify the downloaded forms. Is this possible with PDFTron?
If it is not PDFTron, Is there any other way I could do this?
Yes, PDFTron fully supports online form filling and the export/import of XFDF data. In particular the WebViewer technology sounds like the best fit for you. It comes with out of the box form field filling, and XFDF is uses as the data interchange. A simple call in javascript to AnnotationManager.exportAnnotations() will give you all the form field data that you can use with any XFDF compliant PDF SDK.
This is the online sample for form filling. It will work on any modern browser/device.
https://www.pdftron.com/webviewer/demo/samples/forms/index.html?doctype=xod
This presentation explains WebViewer technology at a high level.
https://prezi.com/view/Aug5ft1twZNNKfBXfTIQ/
Finally, this page shows the basics of form field data interchange.
https://www.pdftron.com/webviewer/demo/tutorials/getting-started-annotations.html
I really like PDFTK and the PHP library php-pdftk. It will do everything that you want and more, they are really powerful tools, and free if you open-source your code!
PDFTK: https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
php-pdftk: https://github.com/mikehaertl/php-pdftk

How to generate PDF file using X++?

Can I create simple pdf file in x++? In this pdf I would like to have for example select from one table or simple static text.
MorphX reports can be saved to PDF by using the proper print settings beforehand.
SSRS reports can do this also using similar tricks.
Another way is to generate RTF, then let Word do the PDF creation. Silly, but maybe the PDF is smaller or better looking.
It is possible, but not simple, to generate PDF directly by using third party .Net components.
Some weeks ago, I used the Evo HTML to PDF library http://www.evopdf.com/ to convert simple HTML templates to PDF and it worked great. It can convert plain text as well, so maybe it could be useful for you.
Natively, AX hasn't anything to create PDF files.

PDF type recognition programmatically

I need to recognize if a PDF file is a dynamic form or a read only PDF in my code. No matter which programing language.
Is there any way to be able to detect if my target PDF is a form or not?
What you're looking for is the presence of an "AcroForm" dictionary in the document "Catalog" dictionary. The AcroForm dictionary will be present if the PDF has any kind of form field, signature field, or XFA fields. You'll still need some sort of PDF library tool to parse the PDF objects but there's one available in most languages at this point.
That said, several PDF viewers and online services do allow users to just type onto static PDF files that don't have interactive form fields. I'm not sure if you want to control for that case though.

pdf prepare form modular

I have a few documents that all look the same initially, but then have different content in the middle of the document.
Is there a way to make a base template pdf, and then tell a pdf to use it as the base and then add additional template data to the result.
i.e. like a modular class system.
I am using pdf, adobe acrobat pro DC, and its Prepare Form component.
and I am usign Itext to read the template and then populate the data into a final pdf.
please remove tag if this is not related to itext, but i wondered if there was an option within itext to pull a template and then add the contents from another template.
the answer seems to be use livecycle designer for dynamic tempaltes.
or wait for itexts new dynamic forms.