What’s a good library to create PDF documents?
For a customer I’m looking for a PDF library to create thousands of PDF document. I’ve tried two open source libraries, but didn’t quite like them. I’m not sure if it’s me, the library or just PDF because they didn’t feel right.
So I tried two commercial libraries. One just didn’t allow me to do what I wanted and I don’t even remember which one. The other one is from Syncfusion. It does work quite well, until you hit the details on changing tables, cells and other stuff. And it’s loaded with bugs. I’m not sure how long this has been under development, but I just kept running into ‘features’ to which the common reply was “We have logged this as a issue and our development team is currently working on this.”. They’ve fixed one issue so far and it’s released in next weeks developer build. But it still doesn’t gracefully draw tables on the next page and I can’t change the style of individual cells.
Now I am creating the PDF 100% by hand (or code actually) and perhaps it’s a better idea to create some other format first (html, Word, etc) and convert it to PDF afterwards.
What are your experiences with PDF libraries and/or creating PDF documents?
Never had to deal with creating PDF myself. When I needed that, I usually could create a report with (sorry Dennis) Crystal Reports or Reporting services. You can tell those applications to export the result to PDF format. I obviously have no idea what cound of documents you need to create, but I think that one of these report engines should be able to handle that for you.
In my current project, we need to report monthly reports to operating units for my current client and we do that by generating a PDF using Reporting Services. We even send those reports out to management at the operating units using the SMTP support in Reporting Services.
Come to think of it, you are reporting from a database. You export tables. Sounds like a reporting engine will suit you just fine 😉
I start itching when I think of Crystal Reports or SSRS! 😉
Currently I need to generate thousands of PDF documents automatically on a server and place them all in a folder.
In the future I will only generate a few each day and e-mail them automatically.
I too have been in the situation where i needed to create PDF documents.
I ended up using the component ABCpdf from websupergoo you can find a trial here.
http://www.websupergoo.com/abcpdf-1.htm
We are using two ways:
1) Having a report, which is retrieved as PDF from the SSRS using the webservice.
2)Aspose components: word templates with mailmerge functionality (Can give param arays or datatables), and SaveAsPDF option to export the generated document to PDF for downloading(, HTML for emailing or DOC for printing)
The first option is in use to generate the monthly invoices for customers, (thousands) and is working very well.. (Except for the initial report designer part).
The second one is very easy in creating new document templates (just use word and mailmerge fields).
Regards
HJ Meulekamp
@HJ : But than I’d have to install Word on the server? Not something I’d prefer.
My preference is a good PDF library for 100% total control and extra PDF features. Creating links, annotations, etc, etc, inside your PDF documents.
But it’s awefully slow and there are all sorts of problems that every library has. Bugs and/or features that just aren’t possible.
Not at all, no Word or office components required. You just reference the aspose.word and the aspose.pdf library and thats it, two files extra in your bin folder. (we have a site license embedded as resource into our client library which is using the aspose components. Site license was about 2k dollars, but this is covering distributing our application (parking/permit system) with embedded aspose license) to a lot of clients)
Check http://www.aspose.com and check the sample code, as far as I know it has all the functionality for word… (And I’m using the SaveAsPDF only to send the PDF file to the browser) So I have not used the PDF API myself that much to know how easy it is to use advanced PDF functionality.
As far as our concerns go, the word documents convert to PDF nicely, and word documents are very easy to edit to modify tables, links, markup, embedded images etc.
Then what’s wrong with using a report generator? Because it sounds like you’re creating reports of some sort. I’m assuming the data is supplied by running queries and then displaying the results? What’s the special need for you to do it in code? Just out of curiousity 😉
@HJ : It does look like a very powerfull solution! I’ll have to have a better look at this! Thanks for the advise!
@Jan : Currently it’s a very basic report. But those PDF libraries have special features like annotions, extra security, forms, merging of documents. We might not use forms, but the other features we will use.
+1 for websupergoo.
If you’ve tried it and didn’t like it please do share what you didn’t like about it.
Apache FOP on IKVM?
Apache NFOP used in .net seems to be good to generate PDF’s we used it and works well, with XSLT .
Hi Dennis,
I have some very good experiences with ITextSharp (http://itextsharp.sourceforge.net/). It suited me very well for simple applications (including table generation etc.).
Hi Dennis,
We use ExpertPDF Html-2-PDF for creating PDF documents. (http://www.html-to-pdf.net/)
What we basically do is serialize an entity to XML convert it with an XSLT (so this is your template) to the HTML layout that you want and than convert it.
Best regards,
Guus
I’ve used a heavyweight commercial SGML pagination engine for years which supports PDF output but recently we have switched to PDFLib which has become really very advanced and supports very sophisticated tables etc.
It’s very much multi platform so although there is a .NET SDK it ‘feels’ like a C API.
Maybe you can use Ibex from XMLPDF. You have to create XSL:FO from database or whatever and feed it to their pdf generator. I use XML from SQL database (for XML) styled with XSL-T into FO. Altova’s XMLSpy is also an excellent XML IDE to facilitate XML technologies development.
http://www.xmlpdf.com
http://www.altova.com
PS – thanks for your example code WCF-MSMQ.
Set your life time easier get the http://www.lowest-rate-loans.com and everything you need.
All kinds of windows 7 software code ,office software ,and many kinds of antivirus software ,such as Norton ,kaspersky,TMMS and so on . http://www.keyyeah.com/