Auto-size page from image
See original GitHub issueWould it be possible to add an option to grab width
and height
from an image and then doc.addPage(x: 0, y:0, width: myImageWidth, height: myImageHeight)
?
PDFKit already reads image size and it would save some complexity (adding image-size dependency)
My use case is adding several compressed scanned JPEGs to a PDF. I’d venture to say auto-sizing the pages is an expected convenience.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Free Image Resizer: Resize Photos Online | Adobe Express
Resize your photos easily with the Adobe Express free image resizer. Simply upload your pictures, change the photo size, and download your new...
Read more >Free Image Resizer | Resize Your Images Online - Promo.com
Instant image resizer for all web and social media formats with one click. Free photo resizer for multiple sizes at the same time...
Read more >Resize, rotate, and flip objects in Pages on Mac - Apple Support
To choose whether the object resizes freely or proportionally, in the Format sidebar, click the Arrange tab, then do one of the following:...
Read more >How to resize an image in HTML? - ImageKit.io
One of the simplest ways to resize an image in the HTML is using the height and width attributes on the img tag....
Read more >Resize your image or photo online - It's easy, it's free!
Resize your image online in three simple steps: · Use the top left button to select and upload your picture. Resize Your Image...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can achieve this with the
openImage
function added in v0.8.1:on @types folder create a file named
pdfkit.d.ts
and place this content below:this types was made by me and not contain all types. Be careful