schoero / swissqrbill

Swiss QR Bill generation in Node.js and browsers
MIT License
156 stars 29 forks source link

Embedding anything other than Vector Paths #366

Closed cbrasser closed 2 years ago

cbrasser commented 2 years ago

Hi there, thank you for this awesome library! Just a quick question: There is currently no option to embed anything other than Vector paths in the final pdf, right?

How would you go about embedding png images or other pdf files into the final pdf?

schoero commented 2 years ago

Hi

It is possible to add other images than vector paths. Since this library is based on PDFKit, there are many more methods available than those documented in doc/api.md Take a look at the PDFKit documentation for further information.

pdf.image("path/to/image.png", 20, 20, { width: 100, height: 100 });

Edit: It is not possible to embed other pdf files into the pdf. see here