0
How i can convert first page of pdf to PNG whith PHP
3 Antworten
0
why do you need to do it with php? it seems like a language ill suited for the task. you can just screenshot the first page and ta-da! it's a picture now
0
what happens is that I have a web page in which I upload pdf files I want to show the image of each pdf as a cover or img in miniature and I need to know how to generate image of the first page of each file
0
If you don't need to generate pg1 of each pdf as a png on the fly, then screenshot is the cheapest way to go or find a service that will happily do that for you. Much simpler.
If you must do it at runtime, then maybe this will help:
https://www.npmjs.com/package/pdf-image
I haven't used it though, so I can't attest to its quality of craftsmanship.