Generating PDF in .NET using XSL-FO

有些话、适合烂在心里 提交于 2019-11-29 04:01:40

This is an old question, I know, but none of the answers to date actually addressed the OP QUESTION. She asked for options for using XSL-FO, not "how to generate PDF using code?".

The primary non-commercial answer on the actual question is:

Apache.org Project's FOP

Formatting Objects Processor. It takes XSL-FO compliant xsl code and xml and generates PDF files according to the XSL-FO spec. There are several other commercial options:

  • Ibex PDF Creator
  • AntennaHouse
  • RenderX

If you're looking for an open-source option that WORKS, FOP is it. The FOP is a Java library natively, but it has been ported to .NET via J# (That has it's own issues there I know) in the nFOP project.

I have in the past used the Ibex PDF generator. I was thrown in in a project that already had a license for that, so I had really no other choice. At first I thought it was cumboersome, but eventually I got used to how it works.

I would recommend that you also use some good XML/XSL editor for testing XSL/XPath. XML Copy Editor is a good free open source one.

I researched options a couple of years back. Here's the shortlist: iTextSharp, SharpPDF, Report.NET, NFop and Siberix Report Writer. Ultimately I went with Siberix but I now think iTextSharp would have been the better choice. If it is helpful, you can find out a bit more here.

http://fonet.codeplex.com/

FO.NET is your library

Well i used iText(open source) a couple of times about 2 years ago, but i would not recommend this. The main reason is the lack of documentation and i really dislike the API it just feels outdated setting global variables before calling functions.

What is the reason you need to use XSL-FO? I also used ABC-pdf(commercial) which allows the user to turn HTML pages ( including stylesheets ) to pdf documents, or you can use a simple and documented API.

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