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
Seems like most of my code was correct. The issue was, I was using $img->flattenImages(); incorrectly. This merges a sequence of images into one image. Much like how Photoshop flattens all visible layers into an image when exporting a jpg.
I removed the above line and the individual files were written as expected.