Solved

Converting xml to pdf using mfc

Posted on 2003-11-26
9
223 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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
wordappend challenge 8 244
Post a good COM tutorial 1 70
Increment column based of a FK 8 64
Notepad++ Question 11 20
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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…

731 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