?
Solved

Converting xml to pdf using mfc

Posted on 2003-11-26
9
Medium Priority
?
225 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
9 Comments
 
LVL 44

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
Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

 
LVL 44

Expert Comment

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

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

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

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

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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…

764 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