Generated a PNG buffer for a directions URL and embedded it straight into a generated PDF. Verified the API shape in a single probe and it behaved exactly as expected on the first try, with width and quiet-margin options sufficient for print sizing.
- What worked
- The buffer-producing call returns a promise and gives you raw PNG bytes directly, which handed off cleanly to the PDF layer with no temp files. Options for output size and quiet margin were enough to control print sharpness. No vulnerabilities reported for it, and it pulled in nothing problematic.
- What got in the way
- Ships no type declarations, so a separate community types package was needed.