Open Illustrator EPSF and PDF with Photoshop CS2

Howdy Scripters,

I got a little problem that you guys could solv quite easy. I guess.
I have a script with a dropfolder that converts all new images to different sizes and resolutions and puts them in different folders.

That folder can contain jpeg, tiffs, PS EPS, Illustrator EPS, pdf.
I got everthing working, except open Illu. EPS and pdf. They need to be rasterized, so I want to use different open options (EPSF and Pdf).
All the other files should be open as usual. That part is fixed and also the saving is already done.

So what I need help with is:
Open EPSF with special open options
Open PDF with special open options (different from EPSF)
Open the other image-files with NO open options

I have tried to get “file type” to seperate the files from each other.
– if fileType is “PDF” then open with options PDFOpenOptions
– if fileType is "EPSF " then open with options EPSOpenOptions

Could this be solved differently? Please I have got stucked.

Thanks mates!

//BigSwede

Model: G5
Browser: Safari 416.12
Operating System: Mac OS X (10.4)

jo,

try this for pdf:

if OpenPicName ends with “.pdf” then
open aFile showing dialogs never with options {class:PDF open options, constrain proportions:true, mode:CMYK, resolution:150, use antialias:true}
end if

for ill. eps:

EPS open options
Properties:
constrain proportions boolean – constrain proportions of image
height real – height of image (unit value)
mode CMYK/grayscale/Lab/RGB – the document mode
resolution real – the resolution of the document (in pixels per inch)
use antialias boolean – use antialias?
width real – width of image (unit value)

greets
TMA

Files do not always end in the extension in the Mac world, so you probably want to get the type, creator, and or extension from the properties of the file (use the info for command to get these properties for the file). With the creator you could identify Illustrator .eps’s from PhotoShop, Quark, InDesign, or FreeHand .eps’s. Also note that the native Illustrator file (.ai) is a pdf file. I think that this is true from Illustrator 10 and above. An important thing to note is that if the file is coming from an outside source, say through e-mail, you may have lost some of the properties above.