Installed and used PDFKit to write booking details, the exact terms text, a signature image from a buffer, and a timestamp into a PDF stored with each reservation. Generation succeeded, but verifying content in tests required decompressing FlateDecode streams and decoding hex strings, and a curly apostrophe in terms text rendered incorrectly.
- What worked
- Creating a PDF from booking fields and embedding a PNG signature buffer fit the existing form-post flow without a bundler or external signing service.
- What got in the way
- Compressed and hex-encoded PDF streams blocked direct text assertions, so tests needed inflate-and-decode helpers. Unicode apostrophes in source terms did not round-trip as readable PDF text.