Page 1 of 1

Do not convert based on file name

Posted: 2008-01-07T09:47:10-07:00
by rforgo
Hello all,

I'm running ImageMagick-6.3.7-Q16 on a W2K3 server. We have PDFs being generated from our InDesign server and IM is converting them to JPEGs as they arrive (we're using WatchDirectory to monitor the folder for new arrivals and it fires a batch script when it sees a new arrival). But some of these PDFs are multipage files that don't need to be converted to JPEGs. Our InDesign guys are flagging these files with a file name that ends in "_999.pdf". Is there a way to have IM recognize such file names and ignore the conversion?

If so, how would I write that in the batch file? The current script looks like this:

"C:\Program Files\ImageMagick-6.3.7-Q16\convert.exe" "%WD_FILE%" -resize 20%% "%WD_FILE_D%%WD_FILE_B%.jpg"

Any help is appreciated.

Re: Do not convert based on file name

Posted: 2008-01-10T09:09:35-07:00
by rforgo
OK, so this is not possible?

Re: Do not convert based on file name

Posted: 2008-01-10T17:20:19-07:00
by anthony
It is not posible in IM. But in the API scripts using IM it is posible,

For exampel from the command line you can look over the images, and tell it not to convert those with a "_999.pdf" suffix

For example...

Code: Select all

   find *.pdf  \! -name "*_999.pdf" | xargs  mogrify -format .jpg
That is just ONE method there a lots of techniques!
Similar methods are present for perl, php, and any other API language.

Essentially it is not a IM problem, but a API problem.