INT013 - Create PDF Output using PDFDocumentService
- 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:
Step 1. Plan the PDF Page Content
Step 2. Create the PDF XML Template
Step 3. Create RDMLX Function iiiFN14 to Produce a Single Page PDF
Step 4. Create Function iiiFN15 - Create PDF Output for Employees
Step 5. Create Form iiiFRM08 – Test PDF Output for Employees
- 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:
Where <pgmlib> is your LANSA program library, e.g. dcxpgmlib.
- Copy these files to the . . /training folder
These files are included in a zip file which can be download from: