Print Pre-Population & Automation
Anoto Live Forms' PrintProcessor application provides a convenient way to manually print forms as and when required. In addition to this, PrintProcessor also provides a simple yet powerful way to automate print production, including the ability to pre-populate data onto a form from an external data source and print in bulk.
In order to experience the basic approach to print automation, follow these instructions:
- Open PrintProcessor, select any form and then either print or 'Print-to-file'
- Once printed, open the 'jobman/success' folder in the PrintProcessor installation folder, e.g. C:\Program Files (x86)\Anoto\Anoto Live Forms PrintProcessor\jobman\success
- Copy the latest .pjd file to your desktop and rename it to XML, e.g. my_print.xml
- Using 'File Explorer', open the forms inbox folder located in the PrintProcessor installation folder, e.g. C:\Program Files (x86)\Anoto\Anoto Live Forms PrintProcessor\forms\456\inbox where 456 is the ID of the form you printed in Step 1 as shown in the PrintProcessor window.
- Copy/Paste the XML file from step 3 into the 'inbox' folder from Step 4.
Fig 1 - Locating the Form ID in the PrintProcessor
If done correctly, the file should be consumed and your form automatically printed or output to file.
If you check the "Enable pre-population" field in the DesignTool and then enable pre-population for a specific field(s), you can pre-populate data into the field at print time by adding the field reference and data before the </root> node at the bottom of the XML file generated in the previous section.
Fig 2 - Pre-population enabling a form using the ALF DesignTool
To populate the First_name field with the name "Matt", simply reference the field name and value before the closing </root> node:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <root> <settings xmlns="http://www.penvision.se/printprocessor"> <processors> <object ref="ps2pdfConverter" /> <object ref="pdfSaver"> <propertymapping name="DestinationFile" value="C:\Users\matts\Desktop\Anoto DiagNotes.pdf" /> </object> <object ref="psSaver"> <property name="Enabled" value="false" /> </object> <object ref="formPrinter"> <property name="Enabled" value="false" /> </object> <object ref="psGenPreProcessor"> <propertymapping name="NumCopies" value="1" /> </object> <object ref="psGenerator"> <propertymapping name="Duplex" value="False" /> <propertymapping name="Tumble" value="False" /> <propertymapping name="SafeColorMode" value="False" /> <property name="Cropmarks" value="False" /> <property name="Offset" value="False" /> <property name="Rotate" value="False" /> <property name="PaperPrintCodeSize" value="6" /> </object> </processors> </settings> <First_name>Matt</First_name> </root>
Fig 3 - Example print automation XML file with pre-populated field
To give the form a customised name when submitted and viewed in the Windows client, mobile phone clients or the Anoto Live Forms' 'Viewer', include a <label> tag, e.g.:
<label>Diagnotes form for Matt Storr</label> <First_name>Matt</First_name> <Last_name>Storr</Last_name>
The result of which will be as seen below in the Anoto Live Forms for Windows desktop client and the Anoto Live Forms Viewer (both forms shown are identical except one was printed using just the PrintProcessor, the other using a pre-populated XML file).
Fig 5 - Example of a custom label as seen in the ALF Viewer
To print multiple copies of a form each with its own unique pre-populated data, you can either generate a print automation XML file per form, or alternatively define each form inside its own <prepopdocument> tag e.g.:
<prepopdocument> <label>Matt Storr</label> <First_name>Matt</First_name> <Last_name>Storr</Last_name> </prepopdocument> <prepopdocument> <label>Carl Garner</label> <First_name>Carl</First_name> <Last_name>Garner</Last_name> </prepopdocument>
Using the example file above (which generates a PDF and saves it to the desktop), this would generate a single PDF file containing two forms each pre-populated with its own data.
Anoto Live Forms and its accompanying PrintProcessor software is a very powerful yet simple to use tool that can easily be made part of a digital form workflow. All it requires is the data to be accessible and a small amount of development to automate the generation of a print automation XML file. Placing the file in different form inbox folders controls which form you print. Generating multiple forms using a single XML file is straightforward when using the </prepopdocument> tag.