Monday, November 24, 2025

3D models in PDF documents

PDF can do a lot of things. One them is embedding 3D models in the file and displaying them. The user can orient them freely in 3D space and even choose how they should be rendered (wireframe, solid, etc). The main use case for this is engineering applications.

Supporting 3D annotations is, as expected, unexpectedly difficult because:

  1. No open source PDF viewer seems to support 3D models.
  2. Even though the format specification is available, no open source software seems to support generating files in this format (by which I mean Blender does not do it by default). [1]
But, again, given sufficient effort and submitting data to not-at-all-sketchy-looking 3D model conversion web sites, you can get 3D annotations to work. Almost.

As you can probably tell, the picture above is not a screenshot. I had to take it with a cell phone camera, because while Acrobat Reader can open the file and display the result, it hard crashes before you can open the Windows screenshot tool. 

[1] Update: apparently KiCad nightly can export U3D files that can be used in PDFs.

Thursday, November 13, 2025

Creating valid PDF/A-4 with CapyPDF

PDF/A is a specific version of PDF designed for long term archival of electronic data. The idea being that PDF/A files are both self contained and fully specified, so they can be opened in the future without any loss of fidelity.

Implementing PDF/A export is complicated by the fact that the specification is an ISO standard, which is not publicly available. Fortunately, there are PDF/A validators that will tell you if (and sometimes how) your generated PDF/A is invalid. So, given sufficient patience, you can keep throwing PDF files at the validator, fixing the issues reported and repeating this loop over and over until validation passes. Like this:

This will be available in the next release of CapyPDF.