Modifying PDF meta data via C++ (specifically on Solaris)

I need a method, via C++, to edit the meta data of existing PDF files (such as title, description, author, etc.).
I am on the Solaris 10 platform so I need a library which will compiled under Solaris.

My first attempt was Adobe's XMP toolkit.
However, though there are clauses in its cmake configuration files that deal with Solaris, the actual files to be included for Solaris are missing.

I went through a lot of other free PDF libraries, but most did not seem to support editing of file meta data.

I am currently trying to get podofo to compile on Solaris, though I'm having some issues.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Joe Winograd, Fellow&MVEDeveloperCommented:
I use the PDF Toolkit (PDFtk) to write metadata:

It allows you to change Creator, Title, Author, Producer, Subject, ModDate, CreationDate. It comes in both command line and GUI versions, and the command line version (called PDFtk Server) can be called from C++ (or any language that can run a command line executable).

I use it only in Windows, but there's a binary RPM for Red Hat or CentOS, as well as a source code RPM for it:

I have no idea if you can get it to work on Solaris, but if you do a build of PDFtk Server (the command line version) from the source code without using RPM, perhaps you can get it to work on Solaris. Regards, Joe
bejhanAuthor Commented:
I was more-so looking for a C++ library, rather than a command-line tool.
However, I may have to fall back to that approach if my efforts remain fruitless.
Joe Winograd, Fellow&MVEDeveloperCommented:
The most comprehensive PDF library that I know of is iText:

iTextSharp is the .NET port:

I've never done it, but I think you should be able to call it from your C++ code. Here's a thread that discusses it briefly:

iText should work fine with the JVM on Solaris, but I've never done that, either. Regards, Joe
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

bejhanAuthor Commented:
If I have to call from command-line I might as well use a command-line utility, rather than a Java program.
As well, I am looking for a free option.
Joe Winograd, Fellow&MVEDeveloperCommented:
PDFtk Server (the command line tool) is free under the GPL. In fact, it is even free for redistribution as part of your own software, as long as your software is licensed to the public under the GPL or another compatible license. You may read about its licensing here:

iText also offers a free version under the Affero General Public License (AGPL). And they have commercial licensing for users who don't qualify for the AGPL. You may read about its licensing here:

Regards, Joe
bejhanAuthor Commented:
I was able to get PoDoFo compiled on Solaris.

I've attached the patch for the src directory.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Joe Winograd, Fellow&MVEDeveloperCommented:
You're welcome. I was happy to try to help. And thanks to you for posting what you found. Good luck on the project! Regards, Joe
bejhanAuthor Commented:
No C++ PDF library was provided by experts.
I was able to get an appropriate library compiled.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.