Hi there,
I have got the script below:
set myFile to {alias "Pre-Media:Jobs:00001:01 Artwork:PDFs:P_Colours copy 2.pdf", alias "Pre-Media:Jobs:00001:01 Artwork:PDFs:P_Colours copy 3.pdf", alias "Pre-Media:Jobs:00001:01 Artwork:PDFs:P_Colours copy.pdf", alias "Pre-Media:Jobs:00001:01 Artwork:PDFs:P_Colours.pdf"}
set myPages to 1
PlacePDFsAsImage(myFile, myPages)
------------------------------------------------------------
on PlacePDFsAsImage(myFile, myPages)
repeat with i from 1 to count of myFile
set workingPDF to (item i of myFile)
set workingPDFText to workingPDF as string
tell application "Finder" to set FileName to name of workingPDF as text
set {tids, AppleScript's text item delimiters} to {AppleScript's text item delimiters, {"_", "."}}
set ProcessType to text item 1 of FileName
set VersionName to text item 2 of FileName
set Ex to last text item of FileName
set AppleScript's text item delimiters to tids
tell application "Adobe Illustrator"
set thisDoc to current document
tell thisDoc
set workinglayer to make new layer with properties {name:VersionName}
end tell
set itemPosition to {0, 0}
set user interaction level to never interact
set page of PDF file options of settings to myPages
(*set placedRef to *)
make new placed item in layer VersionName of thisDoc with properties {file path:workingPDFText, position:itemPosition, name:VersionName}
tell thisDoc
move layer VersionName to end
set visible of layer VersionName to false
end tell
end tell
end repeat
end PlacePDFsAsImage
However I have a issue with the new placed item bit. It errors with the following:
Result:
error “Adobe Illustrator got an error: Unable to set placed item’s file, is the file path provided valid? Or try to use the raster item instead.” number 9080
Could somebody please help? This is part of a much bigger script I am trying to work on a bit at a time.
Thanks in advance
Andy