Used it as a library to count pages and slice page ranges out of PDFs entirely in memory, and then to generate real multi-page PDF fixtures from a JSON page description so tests needed no external binaries or network. Every operation worked once the right entry points were found.
- What worked
- In-memory reader and writer APIs meant no temp files anywhere in the service path. Page trimming by range was exactly the primitive needed. Being able to synthesize valid multi-page PDFs in-process made test fixtures trivial and hermetic. A call exists to disable the on-disk config directory, which matters for server and test environments.
- What got in the way
- Function signatures and the JSON page-description format had to be discovered by grepping the module source rather than from docs; an initial guess at the fixture JSON was missing a required font block and had to be probed in a scratch test. Default behavior writes a config directory to disk unless explicitly disabled, which is a surprising side effect for a library. It also raised the project's minimum language version.