Generate Pixel Perfect PDFs

This documentation is for Live Forms 7.3 Not for you? Earlier documentation is available too.

Generate Pixel Perfect PDFs

'  Pixel Perfect PDF generation feature is supported in both the form and flow designers.  You will need  an "acroform" to generate a pixel perfect PDF.  Acroforms (also known as Acrobat forms) are forms that contain writable form fields. You can generate as many PDFs as you like. It is very easy to map 
controls to individual acroform fields for each one. The additional PDF forms are generated at the end of a form/flow and all generated PDF forms will be added to the document set of a completed form/flow. This makes it possible for the form designer to specify doc actions on these additional form documents as well. The designer can construct form/flows in which the generated forms may be viewed at any point in the form/flow via the Form Viewer control.

If a form designed in the Forms designer has generated PDFs associated with it, the PDFs will be carried along when the form is added to a workflow. Existing form viewer controls will work in the new step of the flow.  However, PDF mappings will NOT be preserved when a flow step is extracted as a standalone form.

Import of forms created in previous versions will preserve all PDFs and mappings. Mappings work as they did in the previous version. This includes mappings for the special items listed:

  • Signed section signature and signature date

  • Radio, Dropdown and checkbox options and comments  

  • Table and repeat items by index.

uses a web-based mapping scheme where the designer can map e-form fields to PDF fields within the visual context of the PDF itself in a web page. 

Limitations: 

  • Adobe XFA Forms are not supported.

  • Password or sensitive text fields being transferred to a PDF form will be written in plain text if they are mapped to a PDF field.

PDF Form Generation

The designer must follow these basic steps for each Pixel Perfect PDF to be generated as part of a

form/flow:

  1. Obtain the acroform pdf that you want to populate with

    data.

  2. Design your 

    screens with controls for the information that you want to collect and map to the pdf

  3. Upload one or more PDF acroforms that will serve as PDF form generation templates.

  4. Map the fields in your form to the fields in the PDF acroform. There are two ways to do this described below.

  5. Add the Form Viewer control to your e-form/flow

  6. Test the form/flow and pdfs that are generated

Step 1 - Obtain the acroform

You must have an acroform pdf for successful mapping in

. Acroforms are pdfs that contain writable form fields. There are many acroforms available on the internet. For example, the latest acroform for the federal W - 4 Employee's Withholding Allowance Certificate can be downloaded from the U.S. Treasury website.

If you cannot find an acroform to use, there are tools available to create one. PDFescape is a free pdf editor that can be used to create a pdf with writable fields. For more complicated PDFs (tables.etc..), consider using the paid PDFescape Ultimate version. Refer to the mapping rule guide lines in the table below.

The tool that Adobe uses to create PDF's does not support integration with third party software. Use PDFescape to generate acroforms for mapping with Live Forms.

Some acroforms may not have a writable field for all of the data that you want to collect. For example, the signature field on such forms as the I-9 or W-4 acroforms. The Employee On Boarding form/flow collects information to populate the W-4 PDF after the new employee completes the

 screen flow. Another step of the flow asks the new employee to review the PDF and sign if the information is correct. Mapping the
 signature to the generated PDF cannot be accomplished unless there is a writable field in the W-4 template. You can use a PDF editor  such as PDFescape to add a writable field for the signature to your acroform template.
 signatures are treated as images that can be mapped to text fields so be sure to add the acroform field as a text field. Upload the modified acroform as your PDF template.

Here is an example of a PDF acroform for the federal Employee's Withholding Allowance. Notice the blue highlighted writable form fields.

Step 2 - Design Forms/Flows to collect the information you need

Make sure that you have controls in your forms/flows to collect the information that you need for the pdf . For Example, many forms/flows contain separate fields for the user's First Name and Middle Initial. The first name field on the W - 4 pdf requires the user's first name plus middle initial. To supply this information in this manner, the designer would need to include an invisible control on the form that would be populated by the results of a Business Rule that concatenates the data in the first name and middle initial fields.

Designers should give Group Controls meaningful names whenever possible as it may prove helpful if you are using the Mapping Form Outline.

Step 3 - Upload PDF acroform Templates

When steps 1 and 2 are competed, you are ready to begin the pdf mapping. Launch the form/flow designer.

The form/flow designers have two separate views:

  • form/flow View - canvas where the designer can drag/drop/edit controls/forms to create activities in a

     form/flow. See Designing Forms or Designing Flows for more information.

  • Generated Forms View - canvas where the designer can create/edit PDF forms to be generated.

 Clicking on the edit form/flow View and Generated Forms View icons on the toolbar toggles between the two views.

You will not see the

View forms generated by the form/flow icon when editing a form inside a workflow. In the workflow designer, only the control and rules views are available.

Click the

icon to display the PDF forms view for your form/flow. Existing PDFs (if any) to be generated for the form/flow will be listed. For example, the Employee On Boarding form shown below will generate a pixel perfect PDF for the federal W4 and the I-9 Employment Eligibility Verification form when the Employee On Boarding form is submitted or the Form Viewer control is clicked.

A status of existing pdfs (if any) will be reported using three icons.

  • A green status icon indicates the mapping is complete.

  • A yellow status icon indicates the mapping is incomplete.

  • A red status icon indicates a mapping error.

Click the 

icon to begin. Upload the acroform for the PDF you wish to fill using 
data using the New Form Generation screen. The acroform serves as a PDF form generation template. If you do not provide a name for your template, the file name will be used. The template name should not exceed 30 characters. You can use Templatized Strings when naming your template. For example, naming the template W-4 {LastName} appends the new employee's last name to the pdf in the submission repository. Of course, you must have a control named LastName in your form/flow.

By default, the PDFs generated using the PDF mapper are written out as "flat" PDFs. This means that the fillable fields are removed, leaving only the data and they are read-only. If you want the fillable fields to remain, for example, you want to use Adobe Reader digital signing on the

generated pdf, then check the Generate as fillable form checkbox when uploading your template. When checked, the pdf will be generated with ALL fields remaining in it and editable, including any fields that contain mapped data. It defaults to unchecked/false for backward compatibility. 

Fillable pdfs when viewed with the form viewer control are always flattened so that they are viewable on mobile devices.

PDF acroform (non-flattened) that comes from a frevvo submission is external to

.  There is no way to save changes to the pdf unless the submission is edited, changed and re-submitted.

The uploaded template will be added to the list of the PDFs to be generated.

Click the

icon to edit the template name. If you do not select a file and you try to submit this screen, you will see the message "Form Template file is Required".

Uploading a file that is not an acroform results in the following error:

Click the

icon to remove the template. You will be asked to confirm the deletion as the template and all field mappings will be removed.

  • Skipped activities do not affect PDF's generated by Live Forms. For example, controls in form/flow activities containing default values, that have been mapped in the pdf mapper, will show up in the PDF even if the activity is skipped due to a precondition.  Use a form.load rule to set the "initial state" data dynamically instead.

  •  will not allow the use of an owner or user password protected PDF acroform to be used as a template. It is the the form/flow designer's responsibility to provide an unprotected PDF acroform. There are programs such as PDFescape available to "remove" an owner password from a protected PDF.  Simply upload the password protected PDF to PDFescape, then save and download it. The password will be "removed" from the PDF and you will be able to use it as a template.  

  • A form with mapped pdfs that has been published as a template then is used to create a new form may result in a pdf that is in an error state (red icon). Upload the pdf acroform again to resolve the issue.

  • If you are storing submissions on Box.com, be sure to include the file extension in the name of any acroforms uploaded to

    for mapping Pixel Perfect PDFs.Box will not open any files that do not have a file extension.

Preconditions for PDF

You can set up logic for the PDF via a precondition that will control when the PDF will be generated or it can be used to skip the PDF entirely. For Example, let's say you have a form/flow where you want to generate an English version and a Spanish version of a PDF. Preconditions, in conjunction with Business Rules can be used to determine which pdf is used in the form/flow at runtime. The form/flow contains a Radio control named Language that has two options: English and Spanish.

The precondition can be created in two ways. You can type the JavaScript into the field



or click the
icon to launch the Precondition Editor to create it. Click this link for the full details about how the Precondition Editor works.

When the precondition is built with the Precondition Editor, the expression displays as shown in the image.

The Precondition Editor checks the expression for valid JavaScript and displays appropriate error messages when necessary. Preconditions are re-validated when you click the 

save and test icon and you click on the
Generated Forms icon. If there is an error, the designer is notified and given an option to re-edit.

With this precondition in place, the English verison of the PDF is generated when the user selects the English option for a  Radio control named Language.

Step 4 - Map the Live Form fields to the acroform fields

The PDF mapping screen provides functionality to enable designers to map e-form fields to PDF fields. Mapping is performed a field at a time in the context of a PDF page. Mapping can be accomplished in two ways:

  • Dragging mappable fields from the outline and dropping them onto the PDF field (hi-lighted in either yellow or green).

  • Clicking on a PDF field to activate the PDF Mapping Dialogue

The quickest way to map your pdf is to use the drag/drop method, but if you need to change an index for a table or repeat control,  the Mapping dialogue must be used. Of course, you can change mapping choices on the Mapping dialogue as well.

Click the

Map Fields icon to begin:

In the forms designer only, the following message will display when you click on the Map Fields link:

Clicking Ok saves the pdf form before any further mapping is performed. The designer can choose to cancel the mapping operation and not save by clicking the Cancel button.

The prompt and save of the pdf form mapping is controlled by a web.xml context parameter named: form.save.on.mapping. The parameter defaults to true. If set to false, the designer will not be prompted with the save option and the editing instance will not be saved. This parameter applies only to forms, not flows.

Click the

Map Fields icon. You may see this message as the pdf mappping screen loads.

The PDF view screen is divided into three areas: the form/flow properties pane, the Mapping Form Outline and the PDF forms editor canvas.

Notice the orange color when you are dragging a control from the Mapping Form Outline over a mappable area on the pdf. Drop the control onto the pdf when you see color change to orange.

Previous mapping selections are retained. Dragging a control from the Mapping Form Outline and dropping it on a field that is already mapped, changes to the new mapping.

Functions for buttons and images on this page are listed below:

Function

Description

Function

Description

Done Button

Click this button when mapping is complete or you wish to exit back to the PDF Generated Forms Screen. Field mappings are saved to the in-memory form/flow as they are performed. Mappings are not persisted until the form/flow is saved.

Clear Button

Clicking this button clears all mappings for the whole PDF. All fields are then displayed as not mapped (colored yellow and cleared of all text).

PDF Page thumbnail Image

Thumbnail images are displayed for each page found in the PDF with no limit. The HTML element containing the PDF page thumbnails will be scrollable if there are a large number of pages and all cannot fit in the displayable area. Click the thumbnail image for the page in the acroform where you want to map fields. When clicked, that page is selected for mapping and it is displayed along with any previous mappings filled into the fields.

In the flow designer, steps in the flow are shown as top level elements in the tree. The image shows four steps in the Employee On Boarding flow as they appear in the Mapping Form Outline.

Method 1 - Drag and Drop Mapping

The Mapping Form Outline displays below the form/flow property pane on the left of the canvas. The outline contains all mappable controls along with containing sections, panels, and special mapped items: Signed Section signature and date signed, any single select comment field and checkbox, dropdown and radio options.

Click the Properties pane header to display it.

Click the

plus and 
minus icons in the Mapping Form Outline to expand/contract the Group Controls and display the mappable controls in your form/flow.

Drag mappable form fields from the Mapping Form Outline and drop them onto the PDF fields.

If the mapping complies with the PDF Mapping Rules, then the PDF field is filled in with the name of the e-form control and colored green to indicate that it is mapped. The color of the hovered field will be changed slightly to indicate that the drop can happen there.

Non-mappable control types can be dragged, but you will not be able to drop it on any PDF field. The image shows the Allowance fields from the Live Form/Flow mapped to the corresponding fields on the W - 4 pdf.

Repeat for all mappable controls on all the pages of the template. 

Click the Done button when completed and don't forget to save your form/flow changes.

Method 2 - Clicking on a PDF Field

Mapping can also be accomplished by clicking on a mappable field in the pdf. This activates the PDF Mapping Dialog that is used to 

  • Create a new mapping by clicking on a yellow unmapped field.

  • Modify an existing mapping by clicking on a green mapped field.

The PDF Mapping dialog has an upper portion that names and describes the PDF field being mapped. Below this is a table that shows Live Forms fields. The top row of the table shows any field that is already mapped to the PDF field. Below that is a scrollable table of candidate fields that may be selected for mapping. If there are no mappable fields in your form, you will see the mesage 'No frevvo fields mappable to this PDF field.' Only a single Live Form field may be mapped to a PDF field.

Functions for buttons in the PDf Mapping dialogue box are listed below:

Action

Description

Action

Description

more>> less<< links

Used to hide and show more details about the PDF field being mapped, including Type, selectable values and the name of the field in the acroform. This information is useful when trouble shooting. Selecting more>> shows the details and changes the link to less<<. Selecting less<< hides the details.

Clear Mapping

Clears the mapping (if any). Any selected radio button is cleared. Changes take place immediately.

Selection Radio Buttons

The first column consists of radio buttons for each mapping choice. Click the radio button corresponding to the Live Form control to map it to the field in the pdf. Radios may not be de-selected. Live Form fields are unmapped using the clear button or by selecting another e-form field.

Index Edit Boxes

For repeating Live Form fields, the 1-based index is used to select the field to be mapped. The value must be ≥ 1. The default is 1. Changes take effect immediately upon tabbing/clicking off the the index field. The index field is disabled for non-repeating Live Form fields.

Search Text Box

Use this to search for mapping choices for the pdf field that was clicked. Entering filter text causes the possible mapping selections to change. Only those matching the filter text will be shown. If the name, label or form name (flows) is either a partial or full match of the filter text (case insensitive), then the field is shown in the list of candidate fields selectable for mapping. E-form fields that are incompatible with the PDF field are not shown in the list . Search will find special mapped items such as Signed Section signature, date signed as well as the single select comment field. Use option control values to search for selection control options.

PDF Field

The name of the field in the acroform is displayed here.

For example, let's say you want to map the Employee Signature on the W - 4 to the signature control on the Confirmation step of the Employee On Boarding flow.

Click the Employee Signature field in the pdf. Type the name of the form in the flow, in this case, Confirmation, into the search box. Mappable fields from the Confirmation step in the flow will display as possible mapping choices.

When you hover over the name field on the mapping dialog, a complete path to the control's hierarchy appears as a tooltip. This is helpful when mapping nested controls. For example, Let's say there is a field named a and a field named a inside a section in your form. Hovering over the name column for the controls named a produce the tooltips as shown:

The label and form columns of the Mapping Dialogue displays a maximum of 40 characters. If you have long labels in your form/flow, hover over the displayed text to see the full label text in the tooltip:

Click the Done button when the mapping is completed and don't forget to save your form/flow changes.

Error Conditions:

Mapping validation logic will detect the following conditions and report them as invalid:

  • A mapped e-form field that was removed from the form.

  • A comment that was mapped and then the control's comment property was deselected.

  • A signed section's signature or sign date that was mapped and then the section's signed property was set to none.

  • An option value that was mapped and then the option is changed or deleted.

If you try to save a pdf with mapping errors, you will see the message

Changing the nesting levels of mapped controls does not produce this error. For example, mapping for selection control options, signature and date fields and repeats are automatically updated mappings when controls are moved in/out of Sections.

Clicking the OK button will bring you back to the designer canvas. Clicking the Cancel button returns you to the form/flow home page.

Mapping Table and Repeat Controls

E-form controls placed within repeats or tables use the max number property to create multiple "instances" of the e-form field for mapping. Controls within a repeat (or table) are indexed to allow the user to select the specific control for mapping. For example, the first instance of a repeat/table control with a min value of 1 and a max value of 3 has an index of 1, the second instance has an index of 2 and the third instance has an index of 3. There are no restrictions to the number of repeating items or rows in a table. You can map cells in a table or controls in a repeat using the drag and drop method from the Mapping Form Outline or you can click on the table/repeat field in the pdf and change the index value for instances greater than 1 in the PDF Mapping dialogue.  

Let's take a look at examples that will clarify the mapping process. An Emergency Contact e-form has a table to list additional authorized individuals that a student can be released to in the event the school is unsuccessful at contacting the parents.This table has a min value of 1 and a max value of 3.

To map the columns of this table to an acroform pdf using the drag and drop method, locate the table in the outline and simply drag the Name, Relationship, Home Phone, Cell Phone and Work Phone controls from the outline and drop them into the correct column in all 3 rows of the table.

To map this table using the PDF Mapping dialogue, click on the table cell in the pdf, check the radio button next to the control that you want to map the table cell to and if it is not the first row in the table you must modify the default value of 1 in the Index column to the index for that row in the table.

Here is an example of an Application for IRS Individual Taxpayer Identification Number (W-7) that has fields for Name and Name at Birth - if different. A Repeat control containing a section with name fields and min/max values of 1 and 2 respectively, can be used in your form to capture both pieces of information.

To map the repeat, using the Mapping Form Outline, locate the table in the outline and simply drag the FirstName control and drop it in the Name field in the pdf then drag it again and drop it onto the Name at birth if different field.

Then click on the First Name, Middle Name and Last Name fields in the pdf, and click the radio button for the e-form field that you want it to map to. Leave the index for the 1st repeat item as 1 and change the index for the second repeat item to 2.

After the user clicks the plus sign, the data is mapped as shown:

Entering an invalid index number displays the error shown in the image

Nested repeats, use the max numbers of each repeating level multiplied to determine the total max index of an item. This is best illustrated with the example below showing repeat 2 nested in repeat 1. Each repeat has a section and each section a text control. Each repeat level has a max of 2. The inner most text control will have an index of 4 (2x2) as shown.

Form repeat1 section1 (max 2) text1 -- index = 1 repeat2 section2 (max 2) text2 -- index = 1 section2 text2 -- index = 2 section1 text1 -- index = 2 repeat2 section2 text2 -- index = 3 section2 text2 -- index = 4

If you have empty rows in a table control or blank repeating items in your form, pdf mapping may shift a bit. To keep the mapping predictable, set the min value equal to the max value for the table/repeat controls. This will give you options to map the missing/blank items in the pdf mapper.

Mapping the Upload Control

Let's say you wants to take a photo using a mobile device and then map the photo to a PDF.

 supports mapping of the Upload control that can be used to upload the image to a form/flow. 

  • You can only map one image file per upload control. In the case of upload controls with more than one file, the mapping simply takes the first image file found

  • Common image types supported are: gif, png, jpg/jpeg and bmp. 

  • Tiff is not supported. 

  • Non image file types uploaded are ignored. 

PDF Form Generation Rules

PDF forms are generated as the last step(s) of a form/flow or when the Form Viewer control is clicked. All other activities are completed prior to the execution of any form generation activities. PDF forms are generated by using the mapping meta data entered by the user to map the e-form field data into the PDF's acroform fields. Precondition properties are supported for form generation activities and operate in a standard fashion, i.e. if the precondition evaluates to true, the activity executes.

The specifics of mapping e-form data fields into acroform fields are detailed in the table below:

  • The horizontal columns represent the acroform field types and the vertical rows represent the Live Forms control types.

  • Blank cells indicate that mapping is not possible. E-form fields will not be made available for mapping for those types of  acroform fields.

  • An acroform check box is a single check box and does not correspond one to one to a Live Forms check box.

  • An acroform radio button is a single radio button and does not correspond one to one to a Live Forms radio control.

  • Checkbox, radio and dropdown options are included in the mapping select controls in the PDF (according to the table below). They will be listed as ControlName.OptionName?.

  • Live Forms manual signatures are treated as images. They can be mapped to text fields. The image is linearly scaled to fit within both the vertical and the horizontal dimensions of the text field without any distortion.  

E-Form Field Types

acroform Field Types

Checkbox

Choice/Combobox (Single select)

List

Radio Button

Text

Push Button

Signature

CheckBox

Mapping is done by option value. If the value of any of the selected option(s) on the e-form control matches the 'on' value of the check box, then it is selected. Otherwise it is unchecked. See NOTE below.

Select one item in choice/combo corresponding to selected checkbox options. Equate items/options by the value/option, not label. Only single select supported in some cases (depends on if field is set to multi).

Select items in list corresponding to selected checkbox options. Equate items/options by the value/option, not label. If list box is single select only one option is selected.

Select one item in radio corresponding to selected checkbox options. Equate items/options by the value/option, not label. Only single select supported.

Yes. The label text of the selected option(s) will be comma separated and used.

 

 

CheckBox Option

Yes. If option selected, check box will be selected.

 

 

 

Yes. If selected, then option label text used.

 

 

CheckBox Comment

 

 

 

 

Yes. Only if comment is enabled. Multiple lines will be concatenated (new lines not carried over to PDF).

 

 

Radio

Mapping is done by option value. If the value of any of the selected option(s) on the e-form control matches the 'on' value of the check box, then it is selected. Otherwise it is unchecked. 

Select item in choice corresponding to selected radio option. Equate items to options by the value, not label.

Select items in list corresponding to selected radio option. Equate items to options by the value, not label.

Select one item in radio corresponding to selected radio option. Equate items/options by the value/option, not label. Only single select supported.

Yes. The label text of the selected option will be used.

 

 

Radio Option

Yes. If option selected, check box will be selected.

 

 

 

Yes. If selected, then option label text used.

 

 

Radio Comment

 

 

 

 

Yes. Only if comment is enabled. Multiple lines will be concatenated (new lines not carried over to PDF).

 

 

Dropdown

Mapping is done by option value. If the value of any of the selected option(s) on the e-form control matches the 'on' value of the check box, then it is selected. Otherwise it is unchecked. 

Select item in choice corresponding to selected dropdown option. Equate items to options by the value, not label.

Select item in list corresponding to selected radio option. Only select one by definition. Equate items to options by the value, not label.

Select one item in radio corresponding to selected dropdown options. Equate items/options by the value/option, not label. Only single select supported.

Yes. The label text of the selected option will be used.

 

 

Dropdown Option

Yes. If option selected, check box will be selected.

 

 

 

Yes. If selected, then option label text used.

 

 

Dropdown Comment

 

 

 

 

Yes. Only if comment is enabled. Multiple lines will be concatenated (new lines not carried over to PDF).

 

 

Text & Text Area

 

 

 

 

Yes. Simple text transfer.

 

 

Date, Time, DateTime

 

 

 

 

Yes. Use formatted date/time.

 

 

Email, Phone

 

 

 

 

Yes.

 

 

Money, Quantity, Number