PDF with or without transparency?

Hi,

at this moment we receive a lot of PDF’s from our customers. That’s great but also sometimes hell…
We don’t know when a PDF is 1.3, 1.4, 1.5 or even 1.6. Ok, you can check every PDF individually but when you need to do that for a large bunch of files, you loose a lot of time. Therefor, I was wondering if Acrobat or Illustrator can be (Apple-)scripted to check transparencies in PDF’s. Is there a way to generate a applescript which shows if transparancy is used? So, when a PDF is checked by a script, the result is: no transparency or transparency. The reason is that we have difficulties in our workflow with flattened PDF’s…
Has anyone an idea?

regards,

Kris

This is pretty easy actually.

You can use

set hasAlpha to (do shell script "sips -g hasAlpha " & quoted form of (posix path of theimage))

You can do this with Image Events too, by using metadata, but I find this method the most easy one.

If you read the file as text/string, you’ll see that PDFs start with :

%PDF-1.3
or
%PDF-1.5

which I am pretty sure indicates the level.
Now that doesn’t really tell you about the individual interior parts. You could have a flattened 1.3 PDF placed in InDesign and re-PDF’d out with level 1.6, but it still has flattened image fragments inside of it.