[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Converting xml to pdf using mfc

Posted on 2003-11-26
9
Medium Priority
?
228 Views
Last Modified: 2013-11-25
hello friends,
   i need to convert xml file to pdf format,there i an library called HTMLDOC but its not clear,i possible suggest me.
bye
0
Comment
Question by:prasanna_k
  • 4
  • 2
7 Comments
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 9824524
This isn't an MFC method.
Install a printer driver that writes a pdf file (eg see www.pdf995.com).
Print the XML file and choose the 'pdf printer'.  That will usually prompt for a filename/path and there you have your pdf file.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 9824898
I suspect you don't want to just print your XML to a PDF file, but convert the data in the XML file to a PDF file.

Look at Apache's XML  FOP project (http://xml.apache.org/fop/index.html), which does exactly that: You describe how the XML data is supposed to be converte to other formats, and then the program creates this other format for you. One of the supported output formats is PDF.

The Apache software is free, and you can incorporate it into your own project (the only problem may be that it's written in Java).
There are however other solutions available, one example is
Apoc XSL-FO  http://www.chive.com/ - an XSL-FO renderer for .NET (it's based on the Apache solution)

Even if this is not exactly what you are looking for, I still think that the XSL-FO (or xsl:fo) object formatting is how you would go from XML to PDF.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 9824909
Here is another link for a converter: http://xml.coverpages.org/rahtzPassiveTex11AnnBL.html

BTW: HTMLDOC only converts (X)HTML to PDF, so it would not work with XML.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 11848126
I think I provided the correct solution.
0
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 11849591
I provided a general method of creating any document into pdf.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 11850344
Yes, you provided the general method, which unfortunately in this case is not the right approach: It will give you a PDF document that contains the XML code (potentially nicely formatted). What the asker was after is converting the content of the XML file to PFD, and XSL-FO is the best approach for this.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 11984817
PAQed - no points refunded (of 125)

Computer101
E-E Admin
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question