

To run, simply run the command ruby app.rb from the project's directory. Clone the git repository ( git clone and cd into the target directory (most likely pdf-filler).
#Windows pdf form filler open source install#
Install git if not already installed (or simply download the repository and unzip in the following step).Install bundler if not already installed ( gem install bundler).Install the latest version of Ruby if not already installed ( $ \curl -L | bash -s stable -ruby).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.
