schoero / swissqrbill

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

feature: support jpg- and png-images in pdf #369

Closed vanvuongngo closed 2 years ago

vanvuongngo commented 2 years ago
schoero commented 2 years ago

Thank you for your contribution, I really appreciate that!

However, I don't see much benefits in this wrapper method over calling this.image() directly. I would try to avoid such wrappers, since someone who wants to create an invoice, already has to read the original PDFKit documentation for other methods. Wrapper functions only make the codebase more complex and harder to maintain. In addition to that, the original documentation is much more detailed.

If the intent of this pull request is to make it more clear that it is also possible to add raster images, I would suggest to just mention it in how-to-create-a-complete-bill.md

vanvuongngo commented 2 years ago

Hi @schoero, yes, my intent was to make it clear that it is also possible to add raster images. If it is already possible then please mention this feature in the how-to-create-a-complete-bill.md. It took me a while to figure out how to convert raster images to svg and without a good result.

schoero commented 2 years ago

Thank you for your feedback @vanvuongngo

I try to make it more obvious 👍