aspose file tools*
The moose likes XML and Related Technologies and the fly likes xml to pdf  format .. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "xml to pdf  format .." Watch "xml to pdf  format .." New topic
Author

xml to pdf format ..

AshMir Anil
Greenhorn

Joined: Jun 23, 2006
Posts: 4
Hi Will anyone tell me how to do tht ..

I have xml file.I want to convert that xml file in pdf format.

<StatementOfAccount IOPUCTY="649" CAGLLIC="BB" ICUSCNO="00001001" DCUABDS="060421" IEPSENT="001001001" ICUSTCN="00001001">
<InvoiceItems>
<InvoiceItem>
<Billing-Transaction ICININO="BILL6">
<QCUA3SQ>2</QCUA3SQ>
<DCINISS>050408</DCINISS>
<DCINDUE>050408</DCINDUE>
<ACINTOT>3000.00</ACINTOT>
<ACINTOTL>3000.00</ACINTOTL>
<ACINTOTU>3000.00</ACINTOTU>
<ACINVAT>0.00</ACINVAT>
<ACINBAL>3000.00</ACINBAL>
<ACINBALL>3000.00</ACINBALL>
<ACINBALU>3000.00</ACINBALU>
</Billing-Transaction>
</InvoiceItem>
<InvoiceItem>
<Billing-Transaction ICININO="BILL7">
<QCUA3SQ>3</QCUA3SQ>
<DCINISS>050408</DCINISS>
<DCINDUE>050408</DCINDUE>
<ACINTOT>3500.00</ACINTOT>
<ACINTOTL>3500.00</ACINTOTL>
<ACINTOTU>3500.00</ACINTOTU>
<ACINVAT>0.00</ACINVAT>
<ACINBAL>3500.00</ACINBAL>
<ACINBALL>3500.00</ACINBALL>
<ACINBALU>3500.00</ACINBALU>
</Billing-Transaction>
</InvoiceItem>
</InvoiceItems>
</StatementOfAccount>
peter coster
Greenhorn

Joined: Jan 13, 2006
Posts: 26
You can do this using XSL-FO , using the apache fop engine.

XML-Spy can also do this for you. (altova StyleVision)
AshMir Anil
Greenhorn

Joined: Jun 23, 2006
Posts: 4
I m using xml-spy [altova style vision and I m getting the pdf format also. but my question is how to retrive Billing -transaction child elements.
I have written the following code.
I m not able to acess Billing-Transaction child elements values.
Will u plz tell me how to do tht .
Expecting positive response....
<xsl:template match="StatementOfAccount">
<xsl:apply-templates select="CustomerHeader"/>

<fo:flow flow-name="Arrears Body" xsl:use-attribute-sets="fs10">

<xsl:apply-templates select="CustomerFooter"/>
<xsl:apply-templates select="InvoiceItems"/>

<fo:block id="lastPage"/>
</fo:flow>
</xsl:template>
<xsl:template match="InvoiceItems">
<fo:table>
<fo:table-header>
<fo:table-body>

<xsl:apply-templates select="InvoiceITem//Billing-Transaction"/>
</fo:table-body>
</fo:table-header>
</fo:table>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: xml to pdf format ..