The Tax Receipt sample demonstrates the behavior of a dynamic
PDF form.
This form prints three copies of a tax receipt on a single page:
the foundation’s copy, the chapter’s copy, and the income tax copy.
The sample includes these files:
File
|
Description
|
Tax Receipt.xdp
|
Designer form file located in the Forms
folder
|
Tax Receipt.xml
|
XML data files located in the Data folder
|
Signature.tif
Tax Receipt.tif
|
Image files located in the Images folder
|
Tax Receipt.pdf
|
Rendered forms with merged data located
in the Outputs folder
|
To run the Tax Receipt sampleOpen the Tax Receipt.xdp
form in Designer.
To specify the preview options, select select File > Form
Properties.
Click the Preview tab and do the following tasks:
In the Preview Type list, select Print Form (Two-sided).
To preview the form, click the Preview PDF tab.
The
output sample PDF file in the Outputs folder shows the rendered
form merged with data. Use this file to compare to the results of
the previewed form.
About the Tax Receipt formThe form demonstrates several features.
- Form hierarchy structure
- The Tax Receipt form is based on the data structure in order
to take advantage of the implicit data binding process.
- Master page
- Because the footer text needs to be displayed at the bottom
of each page, it is defined on the Master Page.
- Flowed content
- The instances of the receipt subform are placed one below
the other, which is made possible by setting the taxReceipt subform
Content option to Flowed. The Content option is in the Subform tab
of the Object palette. The Flow Direction, also in the Subform tab,
is set to Top to Bottom. The subform margin settings are defined
in the Layout palette and add the extra spacing required between
two subforms.
- Subform occurrence
- The receipt subform contains the tax receipt information, including
fields and static elements. Because the receipt is expected to print three
times on a single page, the maximum value of the receipt subform
is set to 3. The maximum value is defined in the Binding tab of
the Object palette.
- Global fields
- The donor information is provided once in the data file.
Making the donor fields global enables these values to print for
every tax receipt copy.
- Image field
- Because the treasurer’s signature may vary, the signature
image link is provided in the data file. An image field is used
to display the signature image.
- Maximum number of characters for each field
- The maximum characters value for each field is defined in
the Field tab of the Object palette and is specified as per data
specifications.
- Expandable fields and anchor position
- To accommodate data values that vary in length, the Expand
to Fit option in the Layout palette is selected for the receiptSerial
and copyLabel fields. The anchor position of these fields is set
to allow the field to expand in the proper direction.
- Scripting
- The address values should be displayed as a block. A JavaScript
script is used to concatenate the data values. Because the donorAddress
field value is calculated, the Data Binding option is set to No
Data Binding. The default binding is defined in the Binding tab
of the Object palette.
- Multiple line field
- The donorAddress field Allow Multiple Lines option in the Field
tab of the Object palette is selected so that it can print on several
lines.
- Picture patterns
- Some values are easier to read by using the Patterns option
in the Field tab of the Object palette to apply a display pattern.
For example, the date value is formatted with a long style date
format.
|
|
|