<< Click to Display Table of Contents >> Navigation: Tabs Guide > Form Tab > Add Barcodes to Documents |
Barcodes enable the encoding of form data and display it as a visual pattern that can be decoded by compatible software/hardware:
Figure 1. Example Barcodes. PDF417 Barcode (Left), QR Code Barcode (Center), Data Matrix Barcode (Right)
The functionality of PDF-XChange Editor enables a wide range of dynamic customization for barcodes. Click the dropdowns below for further information:
1. Click the Form tab, then click Barcode. A blue rectangle will be displayed at the location of the pointer. This rectangle represents the barcode:
Figure 2. Active Barcode Tool
2. Move the rectangle to the desired location and then click to add the barcode to the document. Added barcodes appear as below:
Figure 3. Added Barcodes
•Click and drag the yellow control points to resize barcodes. •Use the options in the Format Tab to determine the style and appearance of selected barcodes:
Figure 4. Format Tab, Barcodes
•Click Select Fields to select and edit form fields. •Click the options in the Form Fields group to enable alternative form field formats. •Click Keep Mode to create multiple barcodes consecutively. If this option is disabled then PDF-XChange Editor will revert to the designated default tool after the creation of a single barcode. •Click Tab Numbers to show/hide the tab order numbers of form fields. •The Calculation Order setting is not available for barcodes. •Click Grid to enable/disable the grid, which is used to assist in the accurate placement of form fields, as detailed in (figure 4). •Click Create Multiple Copies to create multiple copies of selected form fields, as detailed here. •Click Fields to show/hide the Fields pane, which is used to view/edit form fields. •The Fill Color option is not available for barcodes. •Click Stroke Color to determine the border color of barcodes. •The Width, Border and Font options are not available for barcodes. •Click Properties to open the Barcode Field Properties pane, which enables the customization of additional elements of barcodes and is detailed in the section below. |
The Barcode Field Properties pane can be used to determine a range of style and functionality options for barcodes. For example, it is possible to use the Actions properties to add multiple dynamic actions to barcodes, such as running JavaScript, launching web links and opening files on the local computer. (JavaScript is a high-level programming language that can be used to perform custom operations. See here for an index of existing JavaScript operations that the PDF-XChange Editor forms can use, as well as additional information about JavaScript). Click Select Fields to select form fields, then click the desired field and click Properties in the Format tab to open the Barcode Field Properties pane:
Figure 5. Barcode Tool, Barcode Field Properties Pane
The options detailed below are available in the Barcode Field Properties pane:
The General properties determine the general parameters of barcodes: •Read Only determines whether or not the barcode can be edited. •Locked determines whether or not the barcode can be moved, and whether or not its properties can be modified. •Field Name determines the name of the barcode. This name is present when the Edit Form tool is selected, and when barcodes are listed in the Fields pane. •Tooltip determines the information displayed when the pointer is hovered over the barcode. •Mapping Name determines the mapping name that the barcode uses. This name is used to reference interactive form data when the form is exported, and does so without affecting the appearance of the name in the original document. •Layer determines the optional content layer to which the barcode belongs. When a field belongs to an optional content layer, it displays only when the layer is enabled. Use the Layers pane to view/create/edit layers, as detailed here.
The Style properties determine stylistic elements of barcodes. They are detailed beneath (figure 4).
The Position properties determine the position and dimensions of barcodes: •Left determines the distance of the barcode from the left margin. •Top determines the distance of the barcode from the bottom of the page. •Width/Height determine the width/height of the form field that contains the barcode. (The X Dimension property, detailed below, determines the size of the barcode itself).
The Default Text Format properties determine the default properties when text is entered into the barcode: •Font Size is always set to auto for barcodes. This is because the font size refers to the size of the tick when barcodes are selected, and the tick must be proportionate to the size of the barcode. •Text Color determines the color of the tick when barcodes are selected.
The Options properties determine additional options for barcodes: •Symbology determines the format of the barcode, as detailed in (figure 1): •PDF417 is a stacked linear barcode used primarily in transport, identification cards and inventory management. •QR Code is a matrix barcode that features advanced storage capacity in comparison to older barcodes, and is one of the most common barcodes used worldwide. •Data Matrix is similar to a QR Code barcode. Data Matrices hold less information that QR Codes, but they are more secure. Additional barcode options are available, depending on the selected barcode format: •Compress Data converts the content of barcodes into a .zip archive when it is enabled. Please note that this is not recommended for mobile scanners, as they are usually incompatible with .zip files. •X Dimension determines the size of the barcode. •ECC Level (Error Correction Capability) determines the level of compensation when barcodes are damaged, for example when printing imperfections occur. A higher ECC level results in a higher degree of data retention in the event of damage, but also requires more space. Please note that this property is not available for the Data Matrix barcode format. •Y/X Ratio sets the ratio of the barcode axes when the PDF417 barcode format is used.
The Actions properties, although displayed in the Barcode Field Properties pane, are not compatible with barcodes and should be ignored.
The Value Calculation properties determine the physical appearance of the barcode: •Calculation Type determines the type of calculation used to create the barcode: •Custom Script enables the use of custom JavaScript in order to create the barcode: •Calculation Script is used to enter custom JavaScript. Click the ellipsis icon to add JavaScript. The Edit Action: "Run a JavaScript" dialog box will open. Enter the desired JavaScript for the action and then click OK:
Figure 6. Edit Action: "Run a JavaScript" Dialog Box
•Reference is an optional property that has several uses, such as to reference the URL of the published form or other relevant information. Values entered in this property will appear beneath the barcode.
•Encode Using Tab Delimited Format encodes fields into the barcode as tab-delimited values. Please note that if the form is configured to output the data in individual XFDF or XDP files, then this format must be used. Additionally, this format enables the inclusion of the most data and is the best choice in cases where the form data will be copied into a database/spreadsheet. •Fields is used to determine the fields that create the content of the barcode. This property becomes available when the Encode Using Tab Delimited Format option is selected, as detailed in (figure 7). Click the ellipsis icon (three dots) to open the Field Selection dialog box, then select the fields to include for the barcode and click OK:
Figure 7. Encode Using Tab Delimited Format, Fields Property Highlighted and Field Selection Dialog Box
•Include Field Name determines whether or not the field name is included in the data of the barcode. Please note that if the form is configured to output the data in individual XFDF or XDP files then the data must be in a tab-delimited format and the field names must be in the first line. •Reference is an optional property that has several uses, such as to reference the URL of the published form or other relevant information. Values entered in this property will appear beneath the barcode.
•Encode Using XML Format encodes fields into the barcode in standard XFDF format. •Fields is used to determine the fields that create the content of the barcode. This property becomes available when the Encode Using XML Format option is selected, as detailed in (figure 8). Click the ellipsis icon to open the Field Selection dialog box, then select the fields to include for the barcode and click OK:
Figure 8. Encode Using XML Format, Fields Property Highlighted and Field Selection Dialog Box
•Reference is an optional property that has several uses, such as to reference the URL of the published form or other relevant information. Values entered for this property will appear beneath the barcode. |
The following example will detail the creation of a barcode that represents numerical form data entered elsewhere in the same form:
1. Click the Form tab, then click Barcode. The blue rectangle that represents the barcode will be displayed:
Figure 9. Active Barcode Tool
2. Click to add the barcode, then click the Format tab and click Properties. The Barcode Field Properties pane will open:
Figure 10. Active Barcode Tool, Barcode Field Properties Pane
3. Scroll down the Barcode Field Properties pane to the Calculation Type property, then select Encode Using Tab Delimited Format:
Figure 11. Calculation Type Property, Encode Using Tab Delimited Format
The next step is to create the form fields from which the barcode will take its data:
4. Click Text Field and Keep Mode, then click to add some text fields to the document:
Figure 12. New Text Boxes
5. Click the Home tab, then click the Hand Tool. Select the text fields one at a time and enter some numerical data:
Figure 13. Active Hand Tool
6. Click the Form tab, then click Select Fields and select the barcode:
Figure 14. Selected Barcode
7. Scroll down the Barcode Field Properties pane to the Fields property and click the ellipsis icon (three dots). The Field Selection dialog box will open. Note that the text fields entered at step four each feature a corresponding check box. Select the boxes of the forms to be included in the creation of the barcode and click OK:
Figure 15. Selected Barcode and Field Selection Dialog Box
The barcode will update to represent the numerical information:
Figure 16. Updated Barcode
If the content of the text fields used to create the barcode is updated then the barcode will update to represent the new information. |