No Subject
No Subject
- Subject: No Subject
- From: email@hidden
- Date: Mon, 27 Nov 2000 11:24:13 EST
Hello everyone, I'm trying to write a script to generate thin (TIFF and
EPS omitted) PostScript files from QuarkXpress 4.1 (single page) documents
for use in the graphic arts industry. The files will eventually be used in a
computer-to-plate process. Up until now we have been printing the Quark
documents to .ps files, but of course, AppleScript could nicely automate this
with a batch processor. The criteria for the PostScript files are as follows:
-must be printed with the page width specified in the page setup;
-must print to a specific folder;
-font inclusion: all
-data format: binary
-OPI: omit TIFF and EPS.
One problem I've run into is that the Quark scripting dictionary lists "EPS
data format" and "OPI" under the "save" command and not under the "print
PostScript file" command, and I can't find the "font inclusion" command
anywhere in the dictionary. Also, I'm not sure if the script causes Quark to
print using the current page setup. The script I have will create the
PostScript files, but they don't work in any of our plating processes. Here's
what I have so far:
on open postscript_maker
tell application "Finder"
set dest_path to choose folder with prompt "Select a destination folder
for postscript files." as string
repeat with a_page in postscript_maker
set file_type to file type of a_page
set file_name to name of a_page as string
if file_type is not "XDOC" then
set temp to display dialog "The file \"" & file_name & [soft return here]
"\" is not a QuarkXpress document." buttons {"Skip", "Cancel"} [soft return
here]
default button 1 with icon 2 giving up after 15
else
tell application "QuarkXPress"
open file a_page use doc prefs yes remap fonts no
tell document 1
print page 1 PostScript file (dest_path as string) & file_name & ".ps"
binary data
omit TIFF and EPS
end tell
try
close document 1
end try
end tell
end if
end repeat
end tell
end open
Can anyone improve on this, and get the necessary requirements incorporated
into the script? Many thanks!
Garry Simon