Tuesday, May 30, 2023

A4PDF release 0.2.0

I have just tagged relase 0.2.0 of A4PDF, the fully color managed PDF generation library.

There are not that many new exposed features added in the public API since 0.1.0. The main goal of this release has been to make the Python integration work and thus the release is also available in Pypi. Due to reasons the binary wheel is available only for Windows.

Trying it out

On Linux you probably want to do a Git checkout and run it from there.

On Windows the easiest way is to install the package via Pip.

On macOS you can't do anything, because Apple's compiler toolchain is too old to build the code.

What functionality does is provide?

There is no actual documentation, so the best bet is to look at the unit test file. There is a lot more functionality in the C++ code, but it is not exposed in the public API yet. These include things like (basics of) tagged PDF generation, annotations and external file embedding.

Impending name change

There is an official variant of PDF called PDF/A. Thre are several versions of it including PDF/A-4. I did not know that when deciding the name. Because having a library called A4PDF that produces PDF/A-4:s is confusing, the name needs to be changed. The new name has not been decided yet, suggestions welcome.


  1. Name suggestion: pagedescriber or py-pagedescriber

    1. Thanks for the recommendation. That is probably too long a name, because it needs to go as a prefix to all public symbols and definitions in the public API.

  2. So, of course I had to try it on Mac. It builds almost fine with GCC from Homebrew, except for a couple of missing headers and a lot of linker warnings about symbol visibility. The binaries are unsigned, but codesign from Apple toolchain signs them.
    The missing stuff: is needed for fsync, and the GNU byteswap header doesn't exist but replacing the byteswap wrappers with from C++23 works fine.

    1. Looks like something removed the system headers in angle brackets from the comment. For completeness' sake, they were unistd.h for fsync and bit for byte swapping.