?
Solved

Good PDF generation library for C/C++?

Posted on 2011-09-27
5
Medium Priority
?
341 Views
Last Modified: 2012-05-12
I am looking to integrate PDF generated reports into an application that is written in c++.  I want them native to the application, not generated through a print driver or such.  I also need the application to be platform independent (Linux/AIX/Windows).  Is there a good library out there that does this?  I am trying to avoid the expense of Adobe's PDF API.  I have looked a little at the HaruPDF Library but want to explore all options before investing my time and $$$  in one solution over another.  Any help/advice/experience with this kind of tool/lib would be appreciated.
0
Comment
Question by:cvhoyt
5 Comments
 
LVL 13

Accepted Solution

by:
Hugh McCurdy earned 1000 total points
ID: 36713077
0
 
LVL 13

Expert Comment

by:Hugh McCurdy
ID: 36713086
Or their new page -- http://libharu.org/wiki/Main_Page
0
 
LVL 20

Expert Comment

by:carlmd
ID: 36715665
Take a look at "enscript". This may or may not be installed on your AIX system, but if not it is free and can be downloaded at:
                http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/rpmgroups.html
This converts ascii to postscript, such that you could create ascii reports then convert.
0
 
LVL 7

Expert Comment

by:tampnic
ID: 36715737
If you can live with generating reports onto fixed size templates, here is the approach I took recently when required to print PDF certificates from a GUI E-learning application.

1) Use Adobe Acrobat to create a PDF form, fields added as placeholders for the data from the application. This is the template for all certificates in my app.
2) Use the FDF toolkit from Adobe (free and cross-platform) to generate FDF files with the data to be inserted e.g. course name, user name, date passed etc.
3) Use pdftk (open source and cross-platform) to merge data from FDF files onto the form template, outputting a flattened PDF for printing or storage.

I actually stripped out a lot of the pdftk source code, leaving just the FDF merge functionality, and compiled it into a DLL for use in my Windows app. The downside to this approach is you are putting data into fixed size fields on a page so layout is restricted, but this was not an issue in my situation.

PDF is a royal pain - maybe one of the open XML document formats would be more suitable?

Cheers,
  Chris
0
 

Author Closing Comment

by:cvhoyt
ID: 36927354
Thanks what I figured all along.  Thanks for confirming.
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

755 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question