This document (post) is a quick-draft containing notes pertaining to my little (WORKING) scripts which makes compiling PoDoFo pretty easy (at least for myself).
Intent on some p/invoking, I noticed quite a few posts/articles/questions questioning or confusing on “how to build podofo in VisualStudio”, so when my little adventure figuring it out worked out nicely, I figured that writing this up and into the public domain couldn’t hurt.
This scope does not go beyond an initial working build of podofo.dll or a static library.
You should at least generally understand writing/building C/C++ apps in VisualStudio to find this useful, as I’m sure if you’re reading this with interest you’re well aware.
If you are friendly with msys2, feel free to ‘check out’ github.com/tfwio/msys2-pdfstuff-packages—which contains msys2 build-scripts for creating and installing podofo, mupdf and mupdf-qt packages.
- Starts Here
- Script Introduction
- Compile on the Command-line with MSBuild
- Patches Explained
- (Optional) Bash Scripts Explained
- Table: Nuget Packages
- Gist Files
PoDoFo is quite capable a PDF writer, written in CPP (not a renderer). In using it, you are going to want to become familiar with PDF specifications, and perhaps download PoDoFo-browser (QtApp) to get a look under the hood of some gritty PDF files to study.
One of the surprising features that PoDoFo has to offer which other libraries do not is the ability to edit an existing document—however, probably better off sticking to creation of PDF documents. In many cases, attempting to write into (edit) a PDF from the wild will demand recalculation of any existing matrix-transformations in order to predict where drawing/writing is going to take place.
Designed to save you a little time when it comes to building PoDoFo in VisualStudio 2013 Express using NuGet packages.
Nuget supplies us with
libeay32.dll (libcrypto) and
Most of the work involved in setting up compilation from scratch was in finding the nuget packages and resolving paths to the particular includes and binaries being linked to—preparing variables to inject into our call to
cmake.exe. Other than that, there was one minor ‘issue’ which had frustrated me slightly in figuring out how and why the OpenSSL/libCrypto include path wasn’t injected into each project during the cmake (Visual Studio project) generation process—so I ran into compilation errors until patching