This adapter creates barcodes and adds them to an existing non-protected PDF document. The barcode graphics can be positioned, scaled and rotated on any PDF page. The barcode types Code 39, Code 128, Codabar, EAN 13, Code 25-Interleaved 2 of 5 and POSTNET are supported.
The barcode data is stored in an adapter-specific input XML document. The adapter outputs a PDF document that has been supplemented with the specified barcodes.
Properties
|
Operation |
Determines which operation the adapter executes Possible values: |
Parameter
|
Adapter |
Main class of the adapter (do not change!) Possible values: |
|
ReadPartially |
Load PDF document into memory in multiple parts (can improve the performance) Possible values:
|
|
toXML |
Output PDF document Base64-encoded in an XML document Possible values:
|
Status values
|
|
The operation was executed successfully. |
|
|
The operation was executed successfully, but without any result. |
|
|
The operation failed due to a technical error. |
Input
This adapter expects an adapter-specific input XML structure in which all data of each barcode graphic is stored (see below). If a PDF from the repository is to be used as the source document, specify its xstore URL in the url attribute in element <PDF>. Alternatively, if the source document is available as a base64-encoded string, you can store this string as the content of the element <PDF encoding="base64"> (see commented out line).
<pdfBarcode>
<PDF url="xstore URL of the input PDF document in the repository"/>
<!-- <PDF encoding="base64">(If input PDF is Base64 string)</PDF> -->
<barcode height="Height" width="Width"
rad="Rotation (radians)" degree="Rotation (degrees)"
xPos="Distance from left margin" yPos="Distance from bottom margin"
type="Barcode type" page="Page">Barcode data</barcode>
</pdfBarcode>
Attributes in the input XML document
The PDF Barcode Adder expects an adapter-specific input XML structure according to the above pattern. The following attributes can be set:
|
url |
xstore path specification to the input PDF document in the repository (e.g. xstore://Project/Data/InputData.xml; required). |
|
height |
Height of barcode graphic in cm or pt (required) |
|
width |
Width of the barcode graphic in cm or pt (required) |
|
rad |
Rotation of the barcode graphic in radians |
|
degree |
Rotation of the barcode graphic in degrees (required) |
|
xPos |
Distance of barcode graphic from left margin in cm or pt (required) |
|
yPos |
Distance of the barcode graphic from the bottom of the page in cm or pt (required) |
|
type |
Barcode type (required) Possible values:
|
|
page |
Page number in the PDF document on which the barcode graphic will be positioned (required). |
Example
The following input XML document contains the data to create an EAN 13 barcode graphic with 3 cm width and 20° slope on the first page of a PDF document in the repository.
<pdfBarcode>
<PDF url="xstore://Project/Folder/InputPDF.pdf"/>
<!-- <PDF encoding="base64">base_64_encoded_PDF_document</PDF> -->
<Barcode height="3cm" width="3cm" rad="" degree="20"
xPos="120pt" yPos="1cm" type="EAN"
page="1">1234567891234</Barcode>
</pdfBarcode>