Simple Preflighting
Looking for suggestions for a simple way to check image files - not only PDFs, but jpgs, tiffs and other formats. My first inclination is to use iMagick with ghostscript to simply open an image file up, but there are some files that will open, but are still partially downloaded or incomplete. The end use for the images will be programmatically placed into InDesign...
You want to check files to see if they are corrupt or incomplete? Anything else you're looking to check for?
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Use a preflight profile with a simple check like "Document is damaged or needs repair"? For the images, I suppose you could open and resave them.
I'm just a dude. Anything I say has nothing to do with any other person or company.
Well, you could use ImageMagick's identify (with "-regard-warnings -verbose") for images, reading the results of stdout. For JPEGs, you could scan the file for the end of file marker which is something like "\xFF\xD9" or use something like jpeginfo, both discussed here: https://stackoverflow.com/questions/198 ... -jpeg-file
The problem is you'd have to define a test for each filetype which is a pain. Let me know what you end up doing.
The problem is you'd have to define a test for each filetype which is a pain. Let me know what you end up doing.
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix