Solved

Good PDF generation library for C/C++?

Posted on 2011-09-27
5
299 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 250 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux server cannot access samba share 12 91
AWS vpc peering connection 1 43
Issues with C++ Class 19 81
Recommendations for Web-Based Multi-User File Manager / FTP software? 4 58
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.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

867 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now