Delphi PDF generation

27,221

Solution 1

We are using Gnostice and are very pleased with it. It allows us to print our ReportBuilder reports to PDF, HTML, XML, Excel, Gif, ...


Some minor issues we have come accross working with the component

  1. Somewhere deep in the bowels of the component, Application.Processmessages get's called. You have to make sure your code handles reëntrance.
  2. We had to set Preferences.UseImagesAsResources of the TgtDocSettings component to True to resolve AV's when printing to anything else but PDF.
  3. Probably due to the way we use the component but the first printed page was always Portrait. We had to add a call to gtRBExportInterface.Engine.Settings.Page.Orientation to set the orientation to landscape if needed.

Solution 2

Use our SynPDF unit. Among its features, you can use a true TCanvas to create the PDF, and embed True Type fonts subsets. It's one of the few libraries handling Arabic languages and such (via the UniScribe API). It's fully Unicode ready, and very fast.

And it's FREE and OpenSource! Works from Delphi 6 up to Delphi XE.

http://blog.synopse.info/?q=pdf

Solution 3

PowerPDF is free and opensource (LGPL). its realy small but effective!

PowerPDF

Solution 4

We use wPDF. We don't generate pdf-files directly thought - we generate different reports, and 'print' them to pdf as an alternative to printer.

Solution 5

Here are some (All Commercial) I came across when looking for something similar:

I found that the freely available ones LibHaru, PoDoFo weren't up to scratch for my requirements unfortunately.

Share:
27,221
Marius
Author by

Marius

Norwegian Delphi and .Net developer/architect/DBA/founder based in London

Updated on July 05, 2022

Comments

  • Marius
    Marius almost 2 years

    We're using Fast Reports to create reports but we're not very happy with the quality of the PDFs it creates. I know we can plug in other PDF components instead of the one that comes with FastReports so my question is

    What good PDF components are there out there (Free or Commercial) for Delphi? Ideally it should not require any dlls.

    Edit: I bought Gnostice in the end as it had the FastReports integration, source available and a fairly good reputation. I did however find an issue (after I had bought it) with exporting multipage reports from FastReports to PDF where the component leaks memory and corrupts the output. I've reported it to Gnostice so I guess we'll see how good their support is in the next few days...

    Edit 2: Gnostice came back with a fix that rectifies the memory leak and the corrupted output.

  • Arnaud Bouchez
    Arnaud Bouchez almost 11 years
    There is some post on our forum about FastReport support. Latest 1.18 revision of SynPDF allows huge content generation. I tested it with more than 200,000 pages of text or images - pretty fast and using a low level of memory.
  • Steve
    Steve almost 11 years
    PowerPDF is obsolete according to the above link
  • Alasdair Stark
    Alasdair Stark over 10 years
    Just been playing with this and it's a great free solution!
  • Arnaud Bouchez
    Arnaud Bouchez almost 10 years
    The library is still evolving. 64 Bit support, XE6 support, enhanced metafile rendering, encryption, smaller pdf size...
  • Pavel
    Pavel over 9 years
    We have purchased a license, but the technical support ignores us.