Saving Each PDF Page to an Image Using Imagick

后端 未结 4 746
生来不讨喜
生来不讨喜 2020-12-29 07:49

I have the following php function below that\'s converting a local PDF file into images. In short, I want each PDF page to be converted to a separate image.

The func

4条回答
  •  一整个雨季
    2020-12-29 08:44

    There is a much easier way without the loop, just use $img->writeImages($filename,false); and it will make a file per PDF-page. As you said, if you flatten the image first, it only saves 1 page.

提交回复
热议问题