

pdftk can be freely downloaded and installed on most systems. PDF Filler uses pdftk to handle the action form filling. But if you'd like to grab the source code and host it locally, it's actually pretty easy. You can freely use PDF Filler as a web service. The service will be exposed on port 4567 by default. To run, simply run the command ruby app.rb from the project's directory.

Latest stable version of Ruby (+ the Bundler gem).For example, to structure an HTML form, you may do so as follows: via an API) or as a standard web-based form. Structuring the HTML Formĭata can be submitted programmatically (e.g. If no page is given, the first page will be assumed. This data is passed using the following naming convention for the field: x,y,page (or simply x,y) where X and Y represent the pointer coordinates from the bottom left hand corner of the document. Non-Fillable PDFs (e.g., scanned or other PDFs without structured forms) require passing X, Y coordinates, and (optionally) a page number. To get a generic HTML representation of any fillable PDF form If the PDF field contains reserved characters, simply urlencode the field name prior to POSTing.

Note: Due to the way HTML handles forms, certain special characters such as square brackets will not properly POST to the service. The service will return the filled in PDF as a download. Be sure to pass a key of "pdf" with the URL of the PDF to fill. POST data should be in the format of key => value where key represents the field name and value represents the field value. To fill out a PDF, issue a POST request to /fill. To get a JSON representation of all fields within a given PDF To get a list of all fields within a given PDF Getting Field Namesįield names can be discovered locally using open-source PDF utility pdftk, or dynamically using the service. In both insstances, the field value should contain the user input for that given field. In non-fillable PDFs, the key should represent the field coordinates as described below (e.g., 100,100). For fillable PDFs the key should represent the field name. These fields can either be fillable PDF form fields, or can be an arbitrary x/y coordinate of a non-fillable field. PDF Filler works by accepting a key => value pair of field names and values. The project abstracts the form-filling logic of pdftk and prawn. Provides developers with field name lookup service to facilitate the rapid development of client applications.Dynamically generates HTML forms for any fillable PDF.Works with both fillable and non-fillable (e.g., scanned) PDFs.Submit form values via HTTP POST, receive the completed PDF as a download.RESTful service (API) to aid in the completion of PDF-based forms.PDF Filler can even automatically create the markup necessary to embed an HTML form in an existing webpage. Simply pass it the URL to any publicly hosted PDF. PDF Filler works with virtually any unencrypted PDF, supporting both fillable (e.g., PDFs with pre-defined entry fields) and non-fillable (e.g., scanned PDFs) forms. PDF Filler is a RESTful service (API) to aid in the completion of existing PDF-based forms and empowers web developers to use browser-based forms and modern web standards to facilitate the collection of information.
