PDF Connector
Version 26.2.9619
Version 26.2.9619
PDF Connector
The PDF connector supports generating rich visual business forms as PDF documents from XML, by using a PDF template.
Key Capabilities
- PDF form generation from XML input using template-based field mapping
- Multi-page output support with selective page generation and barcode field integration
- Support for Code39, Code128, GS1-128, and QR code barcode types with advanced configuration
Overview
PDF connectors translate XML input into PDF output. XML element names are matched with form field names in the PDF template. The value of each XML element is pushed into the appropriate form field to generate the PDF output file.
Connector Configuration
This section contains all of the configurable connector properties.
Settings Tab
Configuration
Settings related to the core operation of the connector.
- コネクタId コネクタの静的な一意の識別子。
- コネクタの種類 コネクタ名とその機能の説明が表示されます。
- コネクタの説明 コネクタとフローにおけるロールについて自由形式の説明を記載するオプションのフィールド。
- Template File The PDF file to use as an output template. This file must have form fields whose names match the incoming XML data. The fields must also be arranged in the format you want for all PDF files generated by the connector. The Example below shows how the XML and the template file work together to generate output.
Other Settings
- ローカルファイルスキーム コネクタがアウトプットするメッセージにファイル名を割り当てるスキーム。ファイル名にマクロを動的に使用して、識別子やタイムスタンプなどの情報を含めることができます。詳しくは、マクロ を参照してください。
Advanced Tab
Other Settings
- 処理の遅延 トランザクションタブに置かれたファイルの処理を遅延させる時間(秒)。これは旧式の設定です。代替として、ローカルファイルシステムの管理にはFile コネクタの使用がベストプラクティスです。
Message
- Sent フォルダに保存 チェックすると、コネクタで処理されたファイルをコネクタのSent フォルダにコピーします。
- Sent フォルダのスキーム 選択された時間間隔に従ってSent フォルダ内のメッセージをグループ化するようコネクタに指示します。例えば、Weekly オプションを選択すると、コネクタは毎週新しいサブフォルダを作成してその週のすべてのメッセージをそのフォルダに格納します。ブランクに設定すると、コネクタはすべてのメッセージをSent フォルダに直接保存します。多くのメッセージを処理するコネクタの場合、サブフォルダを使用するとメッセージが整理されてパフォーマンスが向上します。
Logging
- Log Level The verbosity of logs generated by the connector. When you request support, set this to Debug.
- Log Subfolder Scheme Instructs the connector to group files in the Logs folder according to the selected interval. The Weekly option (which is the default) instructs the connector to create a new subfolder each week and store all logs for the week in that folder. Leaving this setting blank tells the connector to save all logs directly in the Logs folder. For connectors that process many transactions, using subfolders helps keep logs organized and improves performance.
- Log Messages Check this to have the log entry for a processed file include a copy of the file itself. If you disable this, you might not be able to download a copy of the file from the Transactions tab.
Miscellaneous
Miscellaneous settings are for specific use cases.
- Other Settings Enables you to configure hidden connector settings in a semicolon-separated list (for example,
setting1=value1;setting2=value2). Normal connector use cases and functionality should not require the use of these settings.
Automation Tab
Automation Settings
Settings related to the automatic processing of files by the connector.
- Send Whether messages arriving at the connector are automatically processed.
Performance
コネクタへのリソースの割り当てに関する設定。
- 最大ワーカー数 このコネクタでファイルを処理するためにスレッドプールで消費されるワーカースレッドの最大数。設定すると、高度な設定ページのパフォーマンス設定セクションのデフォルト設定がオーバーライドされます。
- 最大ファイル数 コネクタに割り当てられた各スレッドが送信するファイルの最大数。設定すると、高度な設定ページのパフォーマンス設定セクションのデフォルト設定がオーバーライドされます。
アラートタブ
アラートの設定に関連する設定.
サービスレベル(SLA)を実行する前に、通知用のE メールアラートを設定する必要があります。デフォルトでは、Arc はアラートタブのグローバル設定を使用します。このコネクタに他の設定を使用するには、グローバル設定をオーバーライドをON にしてください。
デフォルトでは、エラーアラートが有効になっています。これはエラーが発生するたびにE メールが送信されることを意味します。アラートをオフにするには、有効化チェックボックスのチェックを外します。
件名(必須)を入力し、オプションでE メールの受信者のリストをカンマ区切りで入力します。
SLA タブ
サービスレベル(SLA)の設定に関連する設定.
サービスレベルでは、フロー内のコネクタが送受信すると予想される処理量を設定し、その量が満たされると予想される時間枠を設定できます。CData Arc は、サービスレベルが満たされていない場合にユーザーに警告するE メールを送信し、SLA を At Risk(危険) としてマークします。これは、サービスレベルがすぐに満たされない場合に Violated(違反) としてマークされることを意味します。これにより、ユーザーはサービスレベルが満たされていない理由を特定し、適切な措置を講じることができます。At Risk の期間内にサービスレベルが満たされなかった場合、SLA はViolated としてマークされ、ユーザーに再度通知されます。
SLA を定義するには、予想処理量をON にして設定タブをクリックします。

- コネクタに個別の送信アクションと受信アクションがある場合は、ラジオボタンを使用してSLA に関連する方向を指定します。
- ウィンドウの検知基準(最小)で:
- 処理が予想されるトランザクションの最小値(量)に設定します
- 毎フィールドを使用して期間を指定します
- SLA がいつ有効になるかを示します。開始日 を選択した場合は、日時フィールドを入力してください。
- SLA を有効にする曜日のボックスをON にします。必要に応じて、ドロップダウンから毎日を選択します。
- ウィンドウの期間終了前にステータスを’At Risk’ に設定するタイミングで、SLA がAt Risk としてマークされるタイミングを指定します。
- デフォルトでは、通知はSLA が違反のステータスになるまで送信されません。これを変更するには、‘At Risk’ 通知を送信のチェックをON にします。
次の例は、月曜日から金曜日まで毎日1000ファイルを受信すると予想されるコネクタに対して構成されたSLA を示しています。1000ファイルが受信されていない場合、期間終了の1時間前にAt Risk 通知が送信されます。

Note:必要に応じてSLA アラートをOFF にすることができます。これはWindows メンテナンス期間中に役立ちます。ナビゲーションバーの設定をクリックし、アラート > 一般的なアラートに移動します。タブレットと鉛筆のアイコンをクリックして編集し、SLA アラート設定のチェックを外します。
Generating a PDF Document
The PDF connector reads XML input files and uses the data from these XML files to generate PDF documents that match the Template File PDF document specified on the Settings tab. The structure of these XML input files should match the structure described below, or the legacy structure described in the next section.
XML Format
Here is an example of an XML input file:
<Items>
<PDF>
<FormField1>Some data</FormField1>
<BarcodeField type="code39">>5789337490548932</BarcodeField>
</PDF>
</Items>
As shown in the example above, the XML should match this structure:
- An Items element at the root
- A PDF child element representing a PDF document
- Inside the PDF element, an element that matches the name of each form field that should be dynamically populated with data
The names for each form field (the names to use for elements in the PDF element) come from the Template File PDF document. Whatever value is used to label the form fields in this template should be used as the element names to ensure the correct data is injected into the appropriate field in the resulting PDF.
Multi-Page Outputs
If the template file PDF contains multiple pages, the connector automatically generates the appropriate number of pages when processing an XML input file. In addition, multiple copies of the template file can be generated from a single XML file, in which case the additional copies are appended as multiple PDF pages for the same single output file.
To generate multiple copies of the template file as a multi-page output, simply repeat the PDF element that is a direct child of the root Items element. Each PDF element at this position is considered a separate instance of the template file, so it should contain all of the named form field values necessary to fill out the template.
Output a Subset of Pages
If the template file PDF contains multiple pages, the connector supports generating a subset of these template pages by specifying the appropriate pages in the XML input file. The Items element at the root of the input document accepts a pages attribute with a comma-delimited list of the page numbers (zero-indexed) that should be included in the output.
For example, if the template file contains 4 pages, and only the first and last page should be included in the output, the XML input file would look like this:
<Items pages="0,3">
<PDF>
<FormField1>Some data</FormField1>
</PDF>
</Items>
Barcodes
Barcode fields (form fields that should contain barcode data) are treated just like other form fields: the barcode field has a label in the PDF template which should be used as the element name in the input XML. In addition, barcode fields should have a type attribute that determines the barcode type to generate. The connector supports four barcode types:
- code39
- code128
- gs1128
- qrcode
The numerical data for the barcode is then provided as the XML value for the appropriately named element.
Advanced Barcode Configuration
In addition to specifying the barcode type in the XML input file, the barcode can be configured directly in the PDF template file. When creating and editing the form field that holds the barcode, you can add configuration information to the field tooltip that affects the resulting bar code. This configuration information should always have the following form:
$$parameter1:value,parameter2:value$$
The following parameters are supported for barcodes:
- barcode: the type of barcode (redundant when using the type attribute described in the previous section)
- qrcodeversion: the version of the QR code when the barcode type is set to qrcode
- eclevel: the level of error correction when using a QR code. Accepted values are L (low), M (medium), Q (quartile), and H (high)
- quietzone: a whitespace buffer surrounding the barcode. The value should be an integer value representing a multiple of the smallest bar size (with a recommended value 10 or higher)
The following parameters are uncommon and should only be used for barcodes with special requirements:
- heightnarrowratio: the width of the narrowest bar in relation to the height of the barcode; must be specified as a ratio where height is 1 (for example, ‘0.05’ for 1/20th)
- widenarrowratio: the width of the narrowest bar in relation to the width of the widest bar; must be specified as a ratio where the widest bar is 1 (for example, ‘0.2’ for 1/5th)
- spacebarratio: the width of a space in a barcode in relation to the width of the bar; must be specified as a ratio where the bar width is 1 (default value is 1)
Example
Below is an example XML input file, PDF Template File, and resulting PDF output.
Note: The template file image below is of the Adobe Pro form editor, which displays the names of each form field. Remember that the field names in the template file must match the element labels in the the XML.
Input XML
<Items>
<PDF>
<From1>WAREHOUSE 5B</From1>
<To1>CLEARING HOUSE 14C</To1>
<CarrierRoutingBarcode type="code39">5789337490548932</CarrierRoutingBarcode>
<CarrierRoutingNumber>5789337490548932</CarrierRoutingNumber>
<CarrierName>Fedex</CarrierName>
<PRO_num>12345</PRO_num>
<BOL_num>54321</BOL_num>
<PO_num>87E112CA</PO_num>
<ProductID_num>EE12FUZZY</ProductID_num>
<Quantity>4</Quantity>
<POBarcode type="code39">99123445215586</POBarcode>
<PO_num_2>99123445215586</PO_num_2>
<Carton_num>1</Carton_num>
<Carton_total>1</Carton_total>
<LotID>8821445</LotID>
<SSCCNumber>2709667490538981</SSCCNumber>
<SSCCBarcode type="code39">2709667490538981</SSCCBarcode>
</PDF>
</Items>
Template File

Output

Legacy XML Format
In addition to the XML format described in Generating a PDF Document, the connector supports an older XML input file structure to maintain backwards compatibility. CData recommends that you use the syntax described in the previous section when designing new Flows.
Following is an example of the legacy XML format:
<Items>
<Item name="BillAddressLine1">Wayne Tech Plant 1</Item>
<Item name="BillAddressLine2">100 Wayne Ave.</Item>
<Item name="BillAddressLine3">Chapel Hill, NC 27514</Item>
<Item name="ShipAddressLine1">Same as billing address</Item>
</Items>
In this structure, all children of the root Items element should be called Item, and the name XML attribute should match the form field name in the PDF template file. The same XML attributes described in the previous sections are available in the legacy format (such as type for specifying barcode fields, and pages for generating a subset of output pages).
Macros
ファイルの命名規則にマクロを使用することで、組織の効率とデータの文脈的理解を高めることができます。マクロをファイル名に組み込むことで、識別子、タイムスタンプ、ヘッダー情報などの関連情報を動的に含めることができ、各ファイルに有益なコンテキストを付与できます。これにより、組織にとって重要な詳細をファイル名に反映させることができます。
CData Arc はこれらのマクロをサポートしており、すべて次の構文を使用します:%Macro%
| Macro | 説明 |
|---|---|
| ConnectorID | コネクタのConnectorID を返します。 |
| Ext | コネクタが処理中のファイルの拡張子を返します。 |
| Filename | コネクタが処理中のファイルのファイル名(拡張子を含む)を返します。 |
| FilenameNoExt | コネクタが処理中のファイルのファイル名(拡張子なし)を返します。 |
| MessageId | コネクタがアウトプットするメッセージのMessageId を返します。 |
| RegexFilename:pattern | コネクタで処理中のファイルのファイル名にRegEx パターンを適用します。 |
| Header:headername | コネクタが処理中のメッセージのヘッダー(headername)の値を返します。 |
| LongDate | システムの現在の日時を長い形式(例:Wednesday, January 24, 2024)で返します。 |
| ShortDate | システムの現在の日時をyyyy-MM-dd 形式(例:2024-01-24)で返します。 |
| DateFormat:format | システムの現在の日時を指定されたフォーマット(format)で返します。使用可能な日付フォーマットについては、サンプル日付フォーマット を参照してください。 |
| Vault:vaultitem | 指定されたvault 項目の値を返します。 |
例
%Ext% や%ShortDate% などの引数を必要としないマクロもありますが、引数を必要とするマクロもあります。引数を渡すマクロはすべて次の構文を用います:%Macro:argument%
以下は、引数を渡すマクロの例です。
- %Header:headername%:
headernameはメッセージのヘッダー名です。 - %Header:mycustomheader% は、インプットメッセージで設定された
mycustomheaderヘッダーの値を返します。 - %Header:ponum% は、インプットメッセージで設定された
ponumヘッダーの値に対応します。 - %RegexFilename:pattern%:
patternは正規表現パターンです。例えば、%RegexFilename:^([\w][A-Za-z]+)%はファイル名の最初の単語と照合し、大文字と小文字を区別せずに結果を返します(test_file.xmlはtestに変換されます)。 - %Vault:vaultitem%:
vaultitemは、vault のアイテム名です。例えば、%Vault:companyname%はVault に保存されているcompanynameアイテムの値を返します。 - %DateFormat:format%:
formatは使用可能な日付フォーマットです(詳細はサンプル日付フォーマット を参照してください)。例えば、%DateFormat:yyyy-MM-dd-HH-mm-ss-fff%はファイルの日付とタイムスタンプを返します。
以下の例に示すように、より詳細なマクロを作成することもできます。
- 複数のマクロを1つのファイル名にまとめる:
%DateFormat:yyyy-MM-dd-HH-mm-ss-fff%%EXT% - マクロの外側にテキストを含める:
MyFile_%DateFormat:yyyy-MM-dd-HH-mm-ss-fff% - マクロ内にテキストを含める:
%DateFormat:'DateProcessed-'yyyy-MM-dd_'TimeProcessed-'HH-mm-ss%