Multiple XMLs to PDF: best approach

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 12:33:01

问题


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.


回答1:


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




回答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.




回答3:


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



来源:https://stackoverflow.com/questions/2622949/multiple-xmls-to-pdf-best-approach

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!