6

I have some XML files which are used to generate my webpages, however I need to be able to allow the user to select a number of pages then combine them into one PDF. This PDF needs to have different styling to the actual web page (the content is kept in XML files ;) ).

p.s. the PDF must have table of contents... and will include images taken from the website.

bluish
  • 24,718
  • 26
  • 114
  • 174
anonymous
  • 2,094
  • 4
  • 22
  • 27
  • About "CSS+XHTML to PDF" technologies, see [Why use XSL-FO instead of CSS2, for transform HTML into good PDF?](http://stackoverflow.com/q/10641667/287948) question and answers. – Peter Krauss Jul 26 '12 at 19:28

3 Answers3

3

You would use a library like iText or iTextSharp to build a PDF using your content.

Robert Harvey
  • 173,679
  • 45
  • 326
  • 490
2

Write an XSLT stylesheet which transforms your XML files to XSL-FO and then use an XSL-FO implementation (e.g. Apache FOP) to produce PDF.

Ilya Boyandin
  • 2,999
  • 23
  • 22
  • do you know any good references for this because all the sources I found where out of date and not comprehensive – anonymous Apr 12 '10 at 15:57
1

I use Prince in my product. It's not cheap (neither is my product), but it's extremely easy to use, and very fast.

Robert Rossney
  • 91,640
  • 24
  • 140
  • 215