Utilities for manipulating PDF files.
<Field> repeats in <FieldList>
<action> controls the action that the service will perform. Available actions are:
- getFields - return a list of the form fields in the PDF and their current values.
- setFields - set fields in the PDF
The actions read and write PDF file nodes.
The actions are described in more detail below.
Read the PDF identified by the node in <in>.
Return information about each of the fields - see the output section below.
Set fields sets fields in the PDF field identifier by <in> and writes the output to <out>. <out> defaults to <in>. <out> can end in .$auto to create a new node. Node name, file name and file type will be set from nodeName, fileName and nodeVersionReferenceType, or copied from <in>. Setting fileName also sets the extension. If the fileName is not set, it will automatically be set to "pdf". File types are not set on existing nodes.
Set fields reads the <name> and <value> in the FieldList. If <readonly> is true, it sets the field to readonly to prevent further updates. If <hidden> is true, hide all the widgets associated with the field (note: this does not seem to work even though the hidden flag is correctly set).
If <value> is passed but is empty, the field is reset. If <value> is not passed, the field is not changed, but readonly can be set.
If <convert> is passed, the field is converted. Two values are supported:
<convert>signature</convert> converts a text field to a signature field. The new field has the name of the converted fields, and the original field is renamed with a _hidden suffix, hidden and made read only.
<convert>image</convert> converts a text field to an image field, i.e. the text field is used as a placeholder for image insertion. The image is shrunk to fit the boundaries of the text field and the aspect ratio of the image is preserved. The image to insert is identified by a node in the <image> element. The original field is hidden and made read only.
getFields returns <FieldList>. setFields returns <out>.
Within <FieldList>, <Field> and <Item> repeat.
<name> is the fully qualified name.
<type> is the type of the PDF field. This is one of "text", "checkbox", "radio", "combo", "dropdown" or "signature". Button fields and multi-select lists are not accessible through the service.
<value> is the string value of the field. For checkbox, this is returned or set as "true" or "false". For radio, the value is the export value of the checked radio with that name.
<readonly> is set to true if the field is readonly.
<required> is set to true if the field is required.
<multiline> is set to true for text fields that have multiple lines.
<ItemList> returns a list of <Item> elements, which holds the <name> and <value> for the list of items for a dropdown or a combo box.
<hidden> is true if the field is hidden.
100 - General error, e.g. not a PDF file.
101 - Not authorised
102 - Not found
103 - Parameter error