parallax / jsPDF

Client-side JavaScript PDF generation for everyone.
https://parall.ax/products/jspdf
MIT License
28.53k stars 4.61k forks source link

add an objectFit parameter to the addImage method to be able to add an image to the PDF while preserving the aspect ratio #3694

Open insinfo opened 4 months ago

insinfo commented 4 months ago

add an objectFit parameter to the addImage method to be able to add an image to the PDF while preserving the aspect ratio, the parameter could accept the 'contain' and 'cover' options

https://gist.github.com/dmail/dda5adf57c8d66b73dd6 https://stackoverflow.com/questions/21961839/simulation-background-size-cover-in-canvas

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

insinfo commented 1 month ago

This would be very useful for my use case, which is converting SVGs generated by the FabricJs lib to PDF