E-Ticket Sample

The E-Ticket sample demonstrates and explains the behavior of a dynamic PDF form. The sample form contains numbered notes represented as black circles with white numbers. The notes are explained in About the E-Ticket output.

This form prints a customized Travel Package that contains an airline itinerary, Customs form, medical declaration, flight transfer slips, accommodation information, and boarding passes. The sections of the package are expected to print using different paper orientations.

This sample includes these files:

File

Description

E-Ticket.xdp

Designer form file located in the Forms folder.

E-Ticket.xml

XML data files located in the Data folder.

E-Ticket.tif

Image file located in the Images folder.

E-Ticket.pdf

Rendered forms with merged data located in the Outputs folder.

To run the E-Ticket sample

  1. Open the E-Ticket.xdp file, located in \EN\Samples\Forms\E-Ticket\Forms, in Designer.

  2. To specify the preview options, select File > Form Properties.

  3. Click the Preview tab and do the following tasks:

    • In the Preview Type list, select Print Form (Two-Sided).

    • In the Data File box, browse to the Data folder and select the E-Ticket.xml sample data file.

    • Click OK.

  4. 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 E-Ticket output

These numbered notes correspond to the numbered circle icons in the sample form file.

  1. The Package cover page should print once, and it should use a portrait orientation.

    • The coverPage subform is invoked by the presence of the data group cover page.

    • The coverPage subform is placed on the portrait-oriented master page because it is the first page area defined in the Page Set.

    • The coverPage subform has a minimum count value of 0 and a maximum count value of 1. The Min Count and Max Count options are on the Binding tab of the Object palette.

    • The image file is linked to the form. The link is provided as the URL of an Image object.

    • In the “Items in this travel package” section, a JavaScript script sets the field caption text to plural when appropriate.

    Note: The data values that must print in several locations in the Travel Package are created as global fields; for example, the lastName, firstName, and initial fields.
  2. The Airline Itinerary header information should print before the listing of the flight itineraries, and it should use a landscape orientation.

    • The subform and subformSet occurrence and subformSet relationship type is the required combination to invoke the flightHeader subform.

    • The itinerary subformSet is instantiated only if a flight subform is instantiated. This is possible by setting the subformSet Min Count value to 0. After the subformSet is instantiated, the flightHeader subform is invoked because it has a Min Count value of 1. This is as a result of setting the subform set Type value, on the Subform Set tab of the Object palette, to Use All Subforms in Order.

    • The flightHeader subform is associated with the landscape master page. The flightHeader subform will be placed On Page “landscape”.

    • The flightHeader subform is associated with the flight subform as its overflow leader. The flightHeader subform should print at the top of every page in the Airline itinerary section. The Data Binding field on the Binding tab of the Object palette is set to Use Global Data because the information must repeat.

  3. The flights are specific to the Travel Package and may vary between itineraries.

    • The flight subform is invoked by the presence of the data group flight. The flight subform has a Min Count value of 0 and an unlimited maximum occurrence value. This means that it will be instantiated only if data is available for it and will repeat as many times as necessary to print the available data. The maximum value is unlimited when the Repeat Subform for Each Data Item option is selected and the Max option is deselected. The Repeat Subform for Each Data Item option is on the Binding tab of the Object palette.

    • The flight subform will be placed following the previous subform.

  4. A single Customs declaration is required for each family. The declaration should print using a portrait orientation.

    • The customs subform is invoked by the presence of the data group customs.

    • The customs subform has a Min Countvalueof 0 and Max value of 1.

    • The customs subform is associated with the portrait-oriented master page. The customs subform will be placed at the top of the portrait-oriented page, thereby forcing a new page.

  5. A single Medical Declaration should print per page, and it should use a portrait orientation.

    • The medical subform is invoked by the presence of the data group medical.

    • The medical subform has a Min Count value of 0 and an unlimited maximum occurrence value.

    • The medical subform is associated to the portrait-oriented master page, and it will be placed at the top of the portrait-oriented page, thereby forcing a new page.

    • A JavaScript script will concatenate the passenger’s home address information. The homeAddress field’s Allow Multiple Lines option is enabled to properly display the block of information. The Allow Multiple Lines option is on the Field tab of the Object palette.

  6. The Accommodation header information should print before the listing of the hotels, and it should use a landscape orientation.

    • The subform and subformSet occurrence and subformSet relationship type is the required combination to invoke the hotelHeader subform.

    • The accommodation subformSet is instantiated only if a hotel subform is instantiated. This is possible by setting the subformSet Min Count value to 0. After the subformSet is instantiated, the hotelHeader subform is invoked because it has a Min Count value of 1. This is the result of setting the subform set Type to Use All Subforms in Order.

    • The hotelHeader subform is associated with the landscape master page. The hotelHeader subform will be placed on the landscape oriented page

    • The hotelHeader subform is associated with the hotel subform as its overflow leader. The hotelHeader subform should print at the top of every page in the Hotel accommodation section. The fields are set to global because the information is required to repeat.

    • A JavaScript script is used to concatenate the lastName and firstName data values.

    • The guest address values should be displayed as a block. A JavaScript script is used to concatenate the data values.

  7. The hotel listing is specific to the Travel Package and may vary between itineraries.

    • The hotel subform is invoked by the presence of the data group hotel. The hotel subform has a Min Count value of 0 and an unlimited maximum occurrence value. It will be instantiated only if data is available for it, and it will repeat as many times as necessary to print the available data.

    • The hotel subform will be placed after the previous subform.

    • The room type values should be displayed as a block. A JavaScript script is used to concatenate the data values. Because the roomName fields value is calculated, the Data Binding option is set to No Data Binding.

  8. A single boarding pass should print per page, and it should use a landscape orientation.

    • The boarding subform is invoked by the presence of the data group boarding.

    • The boarding subform has a Min Count value of 0 and an unlimited maximum occurrence value. This means that it will be instantiated only if data is available for it, and it will repeat as many times as necessary to print the available data.

    • The boarding subform is associated with the landscape master page. The boarding subform will be placed on top of the landscape-oriented page, thereby forcing a new page.

// Ethnio survey code removed