

In PDF.js, we parse a PDF file and create the annotations in a web worker. AcroForm annotation elements support user input similar to HTML input e.g. They are often used for things like taking notes on a document or drawing on top of a document. Annotations in PDF are separate elements from the main content of a document. Within a PDF file, the form elements are stored in the annotation data. Filling Forms (AcroForms)ĪcroForms are one of two types of forms that PDF supports, the most common type of form. They support form filling and we will describe them in more detail below. The other two layers are the Annotation/AcroForm layer and the XFA form layer. It contains span elements that are transparent and line up with the text drawn below them on the canvas. The first layer, the text layer, enables text selection and search. PDF.js sends them to the main thread and draws them on an HTML5 canvas element.īesides the canvas, PDF.js potentially creates three more layers that are displayed on top of it. The parsed document will then generate drawing instructions. To understand how we added support for forms and tagged PDFs, it’s first important to understand some basics about how the PDF viewer (PDF.js) works in Firefox.įirst, PDF.js will fetch and parse the document in a web worker.

Below we’ll describe how we implemented the form support, improved accessibility, and made sure we had no regressions along the way.

While we invested more time in the PDF viewer, we also went through the backlog of work and prioritized improving the accessibility of our PDF reader for users of assistive technologies. We decided it was time to reinvest in the PDF viewer (PDF.js) and support filling PDF forms within Firefox to make our users’ lives easier. Firefox supported displaying PDF forms, but it didn’t support filling them: users had to print them, fill them by hand, and scan them back to digital form. If you would like to add additional fields not initially chosen when setting up the Document Template, you will need to create a new PDF Document Template using the steps above.Last year, during lockdown, many discovered the importance of PDF forms when having to deal remotely with administrations and large organizations like banks. Note: Only fields that were selected when the document was originally setup can be added to the document. Under What text goes here? on the options shown to the right, select the desired autofill field from the dropdown menu, which will include the autofill fields you chose in the previous screen.Click Assigned to dropdown on the right.Click on the desired location in the document.Click the Text Box button in the options shown on the left side.Select the required autofill fields from the appropriate fields section.Select the required number of People (Contacts), Companies, Contact Signers and User Signers.Fill out the Document Template Builder:.Click Create New blue button on the top right.The following article provides steps on Creating a Text Editor Template. For more Autofill field options, it is recommended to convert PDF to Word and copy and paste into Clio Text Editor for Document Template creation. Autofill fields for PDF Document Templates include Date Signed, Name, Email, Company, and Title.

