views:

423

answers:

4

What is a good library for creating PDFs in Delphi 2010?

Pre Unicode I used PowerPDF, which though obsolete, was flexible enough to do what I wanted to do (very customized non-db/table based reports)

I currently have PowerPDF compiling in Delphi 2010, but not yet working, and I'd rather not port and debug if there are any good Open Source PDF libraries already available for Delphi 2010...

+3  A: 

I have no info on another library, but thought I would add some information regarding PowerPDF and Unicode support for it:

PowerPDF is essentially abandoned. Successor is the libharu library, which has import units for Delphi (pre 2009 version) as well, with the caveat that it needs a DLL to work.

The real problem with it is that it doesn't support Unicode. This is nothing that can be fixed in a simple way by adding type casts and changing string types - the whole library works with single byte char arrays, so the only Unicode encoding that would be "simple" to add is UTF-8, and there is AFAIK no support for it yet. So unless you are prepared to invest significant work into updating PowerPDF I wouldn't even start on it.

There's another problem with Unicode in PDFs - the 14 core fonts simply don't contain all the necessary glyphs. Proper support can only be achieved with embedded fonts or TrueType fonts that need to be available on the target systems or need to be embedded as well. Note that there are limitations on TTF embedding, each font will specify whether it allows to be embedded or not. Whatever library you choose, you should be aware of this as well.

mghie
Thanks for the explanation, but fortunately I have less than zero interest in getting Unicode to work in the PDF. I'm perfectly content with forcing the API to ansistring and getting it to the point where it works so long as AnsiStrings are passed in, but as this is an obsolete library, I'd rather not put the effort forth if I can avoid it for this hobby project.
Zartog
+1  A: 

You could try TRolePDF by Roledata. It is free, but limited.

I don't know of any Open Source or other free PDF libraries for Delphi. It seems to be a domain for commercial software, since it is a bit of a niche. If there is a good one, I'd like to know as well, since in the future I'm planning to implement PDF export and I'd also like a good open source tool for that. It does seem hardly worthwhile to spend a few hundred dollars for something that is one tiny part of my program.

However, given all that, if you want a full-fledged PDF library that is maintained and supported and has a Delphi 2009 version (and it's important enough to you to spend a few hundred dollars), then you can try the tools at llionsoft.

lkessler
A: 

this seems to be a good library too: Quick PDF

Joe Meyer
+1  A: 

I have been using wPDF from WpCubed for years now. It is already available for Delphi-2010.

http://www.wpcubed.com/products/wpdf/index.htm

Edelcom