Open source PDF library for C/C++ application?

C++CPdfOpen Source

C++ Problem Overview


I want to be able to generate PDF output from my (native) C++ Windows application. Are there any free/open source libraries available to do this?

I looked at the answers to this question, but they mostly relate to .Net.

C++ Solutions


Solution 1 - C++

LibHaru > Haru is a free, cross platform, > open-sourced software library for > generating PDF written in ANSI-C. It > can work as both a static-library (.a, > .lib) and a shared-library (.so, > .dll).

Didn't try it myself, but maybe it can help you

Solution 2 - C++

I worked on a project that required a pdf report. After searching for online I found the PoDoFo library. Seemed very robust. I did not need all the features, so I created a wrapper to abstract away some of the complexity. Wasn't too difficult. You can find the library here:

http://podofo.sourceforge.net/

Enjoy!

Solution 3 - C++

If you're brave and willing to roll your own, you could start with a PostScript library and augment it to deal with PDF, taking advantage of Adobe's free online PDF reference.

Solution 4 - C++

It depends a bit on your needs. Some toolkits are better at drawing, others are better for writing text. Cairo has a pretty good for drawing (it support a wide range of screen and file types, including pdf), but it may not be ideal for good typography.

Solution 5 - C++

PDF Hummus. see for http://pdfhummus.com/ - contains all required features for manipulation with PDF files except rendering.

Solution 6 - C++

jagpdf seems to be one of them. It is written in C++ but provides a C API.

Solution 7 - C++

  • LibHaru seems to be used by many.

A non-open source approach is: PDF Creator Pilot which provides more language options including C++, C#, Delphi, ASP, ASP.NET, VB, VB.NET, VBScript, PHP and Python

Solution 8 - C++

muPdf library looks very promising: http://mupdf.com/

There is also an open source viewer: http://blog.kowalczyk.info/software/sumatrapdf/free-pdf-reader.html

Solution 9 - C++

Try wkhtmltopdf

Software features

Cross platform. Open source. Convert any web pages into PDF documents using webkit. You can add headers and footers. TOC generation. Batch mode conversions. Can run on Linux server with an XServer (the X11 client libs must be installed). Can be directly used by PHP or Python via bindings to libwkhtmltox.

Solution 10 - C++

http://wxcode.sourceforge.net/docs/wxpdfdoc/

Works with the wxWidgets library.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionChrisNView Question on Stackoverflow
Solution 1 - C++akuView Answer on Stackoverflow
Solution 2 - C++View Answer on Stackoverflow
Solution 3 - C++TylerView Answer on Stackoverflow
Solution 4 - C++Leon TimmermansView Answer on Stackoverflow
Solution 5 - C++Lidia MirkinView Answer on Stackoverflow
Solution 6 - C++Sangcheol ChoiView Answer on Stackoverflow
Solution 7 - C++prakashView Answer on Stackoverflow
Solution 8 - C++PeterView Answer on Stackoverflow
Solution 9 - C++M.HefnyView Answer on Stackoverflow
Solution 10 - C++Taran RampersadView Answer on Stackoverflow