I’m having a problem adding bleed to my post script file. Everything works great, till I go to print the ps file and I get this error:
Can’t Make into type real.
I tried several variations with no luck.
Any Help would be great.
Thanks
Here is the script:
set thePrinter to "Printergy"
tell application "Printer Setup Utility"
set current printer to first printer whose name is thePrinter
end tell
tell application "Finder"
set issue_number to text returned of (display dialog "Enter the Issue Number" default answer "00") as string
set region_list to {"California COMMON", "California LA", "California OC", "California SD", "California BigBook", "Chicago", "Colorado", "Texas COMMON", "Texas Austin", "Texas Dallas", "Texas Houston", "Texas BigBook"}
set region_code to choose from list region_list with prompt "Choose a Region:"
if region_code = {"California COMMON"} then
set region_code to "CAL_COM"
end if
if region_code = {"California LA"} then
set region_code to "LA"
end if
if region_code = {"California OC"} then
set region_code to "OC"
end if
if region_code = {"California SD"} then
set region_code to "SD"
end if
if region_code = {"California BigBook"} then
set region_code to "CAL"
end if
if region_code = {"Chicago"} then
set region_code to "CH"
end if
if region_code = {"Colorado"} then
set region_code to "CO"
end if
if region_code = {"Texas COMMON"} then
set region_code to "TEX_COM"
end if
if region_code = {"Texas Austin"} then
set region_code to "AUS"
end if
if region_code = {"Texas Dallas"} then
set region_code to "DAL"
end if
if region_code = {"Texas Houston"} then
set region_code to "HOU"
end if
if region_code = {"Texas BigBook"} then
set region_code to "TEX"
end if
end tell
tell application "QuarkXPress Passport"
activate
set missingFont to {}
set missingImages to {}
set fontList to font list of document 1
set documentImages to properties of every image of document 1 as list
try
repeat with fontName in fontList
if ID of fontName is less than 1 then set end of missingFont to name of fontName
end repeat
end try
try
repeat with documentImage in documentImages
if missing of documentImage is true then
set missingImage to file path of documentImage as text
set missingImage to my getName(missingImage)
set end of missingImages to missingImage
end if
end repeat
end try
end tell
set alertIcon to 0
if missingFont is not {} then
set text item delimiters to return
set missingFont to text items of missingFont as string
set text item delimiters to ""
set missingFont to "These fonts are not loaded:" & return & missingFont
set alertIcon to 2
else
set missingFont to "All the fonts are loaded"
end if
if missingImages is not {} then
set text item delimiters to return
set missingImages to text items of missingImages as string
set text item delimiters to ""
set missingImages to "These images are missing:" & return & missingImages
set alertIcon to 2
else
set missingImages to "All the images are linked"
end if
if alertIcon is 2 then
tell application "QuarkXPress Passport" to display dialog missingFont & return & return & missingImages & return & return & "Create PDFs Anyway?" with icon stop buttons {"Cancel", "YES"} default button {"Cancel"}
end if
on getName(missingImage)
set text item delimiters to ":"
set missingImage to text item -1 of missingImage
set text item delimiters to ""
return missingImage
end getName
tell application "QuarkXPress Passport"
tell front document
set file_name to name as text
set thePages to name of every page
set PagesToPrint to choose from list thePages with prompt "Choose Pages to PDF:" with multiple selections allowed
repeat with apage in PagesToPrint
set pagewidth to (page width as real) + 6
set pageheight to (page height as real) + 6
tell print setup
set printer type to "Prinergy Refiner"
set paper size to "custom"
set paper width to pagewidth
set paper height to pageheight
set paper offset to 0
set page gap to 0
set reduce or enlarge to "100%"
set fit in area to false
set page position to center position
set orientation to portrait
set separation to false
set print spreads to false
set include blank pages to false
set print thumbnails to false
set back to front to false
set page sequence to all pages
set registration marks offset to "12"
set bleed to ".25"
set tiling to off
set data format to binary data
set print quality to normal
set resolution to 2400
set halftone screen to 400
end tell
set file_path to path to the desktop as text
set PSFILE_PATH to (file_path & region_code & "_LX" & issue_number & "_" & apage & ".ps") as text
print (page apage) PostScript file PSFILE_PATH
tell application "Finder"
set FILE_CHECK to false
repeat until FILE_CHECK is true
if exists alias PSFILE_PATH then set FILE_CHECK to true
end repeat
delay 5
end tell
tell application "Acrobat Distiller 7.0"
activate
Distill sourcePath POSIX path of PSFILE_PATH adobePDFSettingsPath "/Library/Application Support/Adobe PDF/Settings/Prinergy Pages.joboptions" destinationPath POSIX path of (path to home folder from user domain) & "Desktop/LUXE_out"
end tell
tell application "Finder"
set trash_file to PSFILE_PATH
delete file trash_file
end tell
end repeat
tell application "QuarkXPress Passport"
activate
display dialog "Your PDFs are Done" buttons {"OK"} with icon 1 default button 1
end tell
end tell
set oldPrinter to "CANON-PRO_Print"
tell application "Printer Setup Utility"
set current printer to first printer whose name is oldPrinter
end tell
end tell