Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

converting xml to pdf .....

Yashpal
Active Contributor
0 Likes
2,926

Hi ,

I have a xml file containing data...how can i display it as a PDF .....

6 REPLIES 6
Read only

Former Member
0 Likes
1,648

Hi Gupta,

Kindly check this link..

http://www.onjava.com/pub/a/onjava/2002/10/16/fop.html

Reward points if it helps..

with regards,

Manikandan R

Read only

Former Member
0 Likes
1,648

hi ,

i know how to convert it to doc

following link got the code

http://www.sap-img.com/abap/xml-file-to-word-document-through-sap.htm

please reward if it helps.

Read only

athavanraja
Active Contributor
0 Likes
1,648

XML file generally contains data. you have to convert the xml file using XSLT or other mechanisms to the desired format (for example a table or tree, etc) this converted stuff should then be converted to PDF.

there is something called XML formatting object (XSL-FO)

using this you can (its a XSL program) build the xsl -fo object with various formatting object and then use the xsl-fo object along with FOP (formatted object processor - sample apache) to convert it to PDF.

since in your case you wanted to do it from ABAP i would suggest yout to parse the XML file into say a itab and use the itab values to generate a list or spool and use them to generated PDF using the stadard FMs ABAPSPOOLTO*PDF, etc

Regards

Raja

Read only

Yashpal
Active Contributor
0 Likes
1,648

Hi Raja,

actually whai i have is a xml data ....i dont want to convert into some internal table...as pdf can read the xml. i want to know how to pass the layout through xml for generating the PDF and how to communicate with the ADS ......

Read only

0 Likes
1,648

Hi Raja,

I have a similar task as you can see here.

I wonder to know how would you parse the XML into a itab. In my case a have a LARGE XML and i haven't got any abap structure to store the xml data in it.

Thanks in advance

Aaron