Skip Ribbon Commands
Skip to main content
Navigate Up
Sign In

Quick Launch

Average Rating:

(2 Ratings)
facebook Twitter
Print Bookmark Alert me when this article is updated


HOW TO: Convert XML / Text files to PDF using B2B Data Transformation

The text / XML files can be converted to PDF files using the XMLToDocument processor that exists in the B2B Data Transformation. You also need the third party tool Business Intelligence and Reporting Tool (BIRT) to create the report.

The steps to create a simple PDF are as follows:

Step 1: Create the report template using the BIRT tool. Refer HOW TO: Create a simple BIRT .rptdesign template (KB 124949) for more details on how to create the report template.

Step 2: Consider a scenario to create a report out of a flat file:

Flat file contents:

Name: Robert Shingha
Position: Senior Engineer
Name: Dave Samuael
Position: Senior Engineer
Name: Mac Grath
Position: Senior Analyst
Name: Samir Singh
Position: Senior Engineer
Name: David Douglas
Position: Associate

Expected PDF Report:

Step 3: The XML schema should be created to represent the data. The XSD is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="" >
<xs:element name="Persons">
<xs:element name="Person" maxOccurs="unbounded">
<xs:element name="name"       minOccurs="0" type="xs:string"/>
<xs:element name="cadre"      minOccurs="0" type="xs:string"/>

Step 4: Now using the parser and the WriteValue element, you can generate the PDF. The BIRT template has to be added to the project in the additional part of the project.

The data has to be parsed and stored into the XSD as an XML structure. The XML has to be then transformed and written as a PDF using the transformer (XMLToDocument) that comes with the WriteValue component.

The WriteValue XMLToDocument transformer takes the following inputs:

  • BIRT template file name
  • Type of output (PDF, XLS, doc)
  • Target Report Location

The parser and the WriteValue are as follows:

More Information
Applies To
Product: PowerCenter
Problem Type:
User Type: Developer
Project Phase:
Product Version: B2B Data Transformation 9.1.0
Operating System:
Other Software:
Last Modified Date:10/15/2012 11:11 PMID:128387
People who viewed this also viewed


Did this KB document help you?

What can we do to improve this information (2000 or fewer characters)