Is there a way to check if a file has raster elements in it? I would be interested to do this for the .pdf, .eps and .ai formats.
If the file is only vector I am converting it to .svg and if it has some raster elements I have to convert it to .png file.
I am working in PHP but I can utilize any command line tools as well. For instance I am considering using Inkscape to do the actual conversion.