Im converting some pdfs to pngs wth
exec("convert readme.pdf readme.png")
And then i need to store in a mysql database the resulting image filenames from any given pdf.
This is because when i convert in this manner and the source pdfs are more than one page i get a series of: readme-0.png readme-1.png readme-2.png
So the question is: how can i determine after conversion the resulting image filenames?
Thanks in advance, hope i made myself clear.
It'll always be originalname-#.png for multi-page conversions.
$input = "readme.pdf";
$basename = basename($input, '.pdf');
$images = glob("{$basename}-*.png");