INT013 Create PDF Output using PDFDocumentService

LANSA Integrator

INT013 - Create PDF Output using PDFDocumentService

Objectives

  • To create an application which produces a PDF document containing employee details and skills.
  • To demonstrate how to use the PDFDocumentService.
  • To understand how to define the PDF document layout, by defining an XML template document.

To achieve the objectives you will complete the following:

Concepts

  • The PDFDocumentService enables complex and dynamic PDF output to be produced.
  • The format of the output PDF document is defined by an XML template document. This XML template includes <content></content> tags which are used to define the content of the various areas of a page. This structure is completely flexible, but will typically include content areas such as header, details, lists and footer.
  • Your RDML/RDMLX program creates a PDF document using the XML template and "adds content" into the content areas defined by the XML template
  • Content can be added in any sequence
  • The page area is defined as a grid. A4 landscape for example, is defined as having an area of 590 x 840 pts.
  • The bottom left hand position is 0,0
  • All output to the page is defined as having a position on an X1, Y1 axis. These values define the top left hand corner for this element. Y is the vertical axis.
  • In the LANSA Integrator guide, refer to XML Content in the PDFDocumentService for details of all the elements which can be defined in the XML template.

Before You Begin

If you plan to run this exercise on your IBM i server:

  • Create the following folder, if it does not already exist:

/LANSA_<pgmlib>/jsm/instance/training

Where <pgmlib> is your LANSA program library, e.g. dcxpgmlib.

  • Copy these files to the . . /training folder
  • lanlogo.gif
  • ph0070.tif

These files are included in a zip file which can be download from:

http://www.lansa.com/support/docs/index.htm

See LANSA Integrator / Extra Tutorial Files.