Closed pkboom closed 1 year ago
Hi @pkboom
The library doesn't have this feature, but it sounds like something that can be useful. Do you want to try and submit a PR with this?
You can get each page size like this:
import gm from "gm";
gm('./test/data/pdf1.pdf')
.identify((error, data) => {
console.log(data.Geometry) // ['842x595', '1684x595', '1684x595', '1684x595', '1684x595', '1684x595', '1684x595', '1684x595', '842x595']
})
Thanks for the tip. Looked at the code for hours. It's a bit complicated to simply write code for this. Sorry for not being helpful this time.
Been searching the doc but couldn't find any solution for this. Is there any way to get an image the same size as a pdf file? I want to get an image that has the same width and height as those of a pdf file.
Thanks.