IBM Support

PDF adapter for Transformation Extender, V9.0.0.2

Product Documentation


Abstract

Transformation Extender version 9.0.0.2 includes the new PDF adapter. The PDF adapter works with Acrobat forms and templates to generate a PDF document or extract data from all or part of an input PDF document.

Content


In Design Studio, use the PDF importer (File > Import) to generate a native XML schema type tree and an associated name-lookup file from the Acrobat form (AcroForm) of an input PDF document. The name-lookup file is required to generate formatted PDF output. The name-lookup file maps each type in the schema to the corresponding AcroForm field name, as follows:

TX_type_name = AcroForm_field_name

You can use the XML schema for mapping, but don’t edit the names in the schema. To change schema field names, edit the AcroForm and import the native schema (.xsd) type tree from the PDF document again.

On output, the PDF adapter can generate a formatted PDF file from an Acrobat template. Without a template, the adapter can create a PDF file that contains unformatted text.
 


PDF adapter commands:
 
Use PDF as the adapter command alias on input and output cards and in GET and PUT rules. For example: 

Input source override execution command -IAPDF card_num
Output target override execution command-OAPDF card_num

 
 
-U filename.pdf
-URL filename.pdf
The file URL of the PDF document. The document can be local (specified as file:///) or remote (specified as http://). If you don’t specify either a local or remote file URL, the adapter treats the PDF document file path as relative to the map directory. Use this command for data sources and data targets.

The -URL command is optional on input cards and GET rules. (For example, a map can pass PDF Acroform data as a blob to the PDF adapter, and the adapter can extract data from the blob in XML format.)
 
The -URL command is required on output cards and PUT rules.

- S schema.xsd
- SCHEMA schema.xsd
Use this command for data sources and data targets.
 
On input cards and GET statements, the –SCHEMA command specifies the name of the XML schema file that the GET transaction is to return with the PDF data. You must specify either –SCHEMA or –PAGE on input cards and GET statements. The –SCHEMA and –PAGE command are mutually exclusive.
 
On output cards and PUT statements, the –SCHEMA command specifies the XML schema used to parse XML data when generating a PDF document. The –SCHEMA command is optional on output cards and PUT statements. If you omit both the –SCHEMA and –TEMPLATE commands, the adapter creates a PDF document of unformatted text.
 
-PAGE {nn | nn-nn}
Specifies a page or a range of pages to read from a PDF document and send to the map as a text blob. Use this command on data sources. This command is optional. You must specify either –SCHEMA or –PAGE on input cards and GET statements. The –SCHEMA and –PAGE command are mutually exclusive.
 
-N filename.names
-NAMES filename.names
The name-lookup file created by importing a PDF document. The .names file maps the AcroForm field names to the types in the schema. Use this command for data targets. This command is required on output cards and PUT statements to create a formatted PDF document. If you omit the –NAMES command, the generated PDF document contains unformatted text.
 
-P template_name.pdf
-TEMPLATE template_name.pdf
The PDF template to use to generate a PDF document. Use this command for data targets. This command is optional. If you omit both the –SCHEMA and –TEMPLATE commands, the adapter creates a PDF document containing unformatted text.
 
-APPEND
Appends data to the specified PDF document. Use this command for data targets. This command is optional.
 
 
Inbound adapter examples:
 
    Command line:
     
      -U JohnDoe1040.pdf -S f1040.xsd
     
    GET rule:
     
      =PARSE(GET("PDF", "-S f1040.xsd", BlobIn))
     
    Command line for reading pages:
     
      -U txredbook.pdf -PAGE 22-23
      -U txredbook.pdf -PAGE 22
 
 
Outbound adapter examples:
 
    Command line with template:
     
      -U My1040.pdf -N f1040.names -P f1040.pdf
     
     
    PUT rule:
     
      PUT("PDF", "-U My1040.pdf -N f1040.names -P f1040.pdf -T", Input))

[{"Product":{"code":"SSVSD8","label":"IBM Transformation Extender"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"}],"Version":"9.0.0.2","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
08 August 2018

UID

swg27049816