The Best Free PDF Library

Hi All,

I am looking for some recommendations on PDF Libraries.

What I need to do is manipulate a series of PDF files, combine, split, add a water mark and so forth from within a series of functions within VBA (inside of outlook and excel).

I am looking for a solution, preferably in the form of a control and not a command line library.

I do not have access to Acrobat, so no acrobat solutions are acceptable, unless they're free and easy to distribute within our office :-)

MTIA

DWE
.
LVL 1
dwe0608Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

Shaun VermaakTechnical SpecialistCommented:
I know you said free and there are some good free options.

I do however recommend GemBox.Spreadsheet. It has a limited free option and paid version allows for Royalty-free deployment
https://www.gemboxsoftware.com/spreadsheet

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:
> preferably in the form of a control and not a command line library

I can't help you with a control, but for a command line library, I strongly recommend the PDF Toolkit (PDFtk) from PDF Labs. PDFtk comes in both command line and GUI versions. The command line version is called PDFtk Server and may be downloaded here:
http://www.pdflabs.com/tools/pdftk-server/

Don't be misled by "Server" in the name. I don't know why they called it that, but it's just an executable (pdftk.exe, with a supporting DLL, libiconv2.dll) that runs on "standard" Windows — it does not have to run on a "server" Windows.

I've been using it for many years in scripts and programs, although I've never tried it with VBA. But since VBA can run a command line program, it should work fine. Here's an EE thread from a few years ago that discusses it:
https://www.experts-exchange.com/questions/26461874/Excel-VBA-How-to-Run-a-Command-Line-with-VBA.html

PDFtk Server can do all the PDF manipulation that you're looking for, including combining, splitting, and adding a watermark. For example, here's the one line solution using the PDFtk Server command line for combining two files into a third:

pdftk input1.pdf input2.pdf cat output combined.pdf

It also accepts a wildcard, so you may do this to combine all files in a folder:

pdftk *.pdf cat output combined.pdf

The "cat" operation "catenates" (joins/merges/combines) the input files into the output file. If you'd like to see the full syntax for the PDFtk Server command line and some usage examples, here are the links:
http://www.pdflabs.com/docs/pdftk-man-page/
http://www.pdflabs.com/docs/pdftk-cli-examples/

Note that Acrobat is not required and that the software is free, even for commercial use (the only time that PDFtk is not free is for distribution of it with a commercial product).

This is an excellent piece of free software. I've done a ton of PDF processing with it. Regards, Joe
dwe0608Author Commented:
Hi Guys thanks for the input - I'll investigate the solutions proposed and will see if someone can point me to a library (OCX, DLL etc) as opposed to a commandline solution (wonder why PDFtk doesnt put a library solution out there) ... I have noted Joe's link to a work around running the commandline solution and I'm willing to give that a go ... pending other input ...
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Shaun VermaakTechnical SpecialistCommented:
For what it is worth, GemBox.Spreadsheet is a DLL
Joe Winograd, Fellow&MVEDeveloperCommented:
If you want to dig into it, there's iText, the granddaddy of PDF libraries:
https://itextpdf.com/

There's also a .NET port of it, called iTextSharp:
https://sourceforge.net/projects/itextsharp/

Here's its GitHub:
http://github.com/itext

It's big and complex...and robust...can do just about anything in the area of PDF manipulation. I haven't used it myself, as PDFtk and the Xpdf utilities (especially, PDFtoText) are able to do everything I have needed so far in PDF manipulation (tools that are easier to use than iText/iTextSharp, imo). Regards, Joe
Joe Winograd, Fellow&MVEDeveloperCommented:
This is one of those questions asking "for some recommendations", so there are no right or wrong answers. Everyone is entitled to make recommendations, so I am selecting all the posts where experts made recommendations of PDF libraries or other helpful comments and am splitting the points evenly. There is no "Best" answer, so I am selecting the first post as the Accepted Solution and all others as Assisted Solutions.
dwe0608Author Commented:
I am sorry guys I never made it back here ... I came down with a terrible flu and was incapacitated for a week or so ... My apologies to all ...
Thanks for the informative responses ... I am content with the sharing of the points and agree with Joe's comments...
Joe Winograd, Fellow&MVEDeveloperCommented:
Thanks for the feedback. Sorry to hear you were so ill. Hope you're feeling better now and on the road to complete recovery. Regards, Joe
Maggie JYCommented:
Why not choose a PDF tool? Now many PDF solution provide you batch process to  combine, split, add water mark with ease. What's more, more features enable you to improve your productivity at work. Here are some PDF solution for your reference.
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
Outlook

From novice to tech pro — start learning today.