I am having some weird problems when trying to save a qxd doc to ps using bleed.
Bleed is mostly not present in the pdf created by the ps generated by my script.
Sometimes this script works, when it actually works i quit QXP, to try it again, then it won’t work. The stage of getting it to work is achieved by running the script multiple times and not changing it…?! run… close doc… run it again… close doc… .again… close doc. Sometimes it works after 2 times, sometimes it wont work at all. When use a loop to try to achieve it won’t work… I am out of options… anyone??
Even when printing directly to a printer, it sometimes does work (mostly not).
(*
No fancy stuff, files are found on the desktop.
No error handling, just trying to explain my problem.
No final code.
measements are in mm
Software used:
- QXP Passport 6.1 (tried Dutch and International English)
- Acrobat Professional 6.01
*)
set printToFile to true -- set to false to print to your default printer (A4)
-- yep, nothing fancy, just find or place this files at the desktop
set QuarkXPressDoc to (path to desktop as string) & "bleed.qxd"
set postscriptPath to (path to desktop as string)
repeat with i from 1 to 1 -- used to catch my problem while printing mulitiple time
set PostscriptDoc to postscriptPath & "bleed_" & (i as string) & ".ps"
tell application "QuarkXPress Passport"
activate
open QuarkXPressDoc as alias use doc prefs yes remap fonts no do auto picture import yes
set myDoc to document 1
-- save myDoc
set paper_width to (page width of myDoc) as real
set paper_height to (page height of myDoc) as real
-- print setup settings
tell print setup of myDoc
-- print setup settings
set printer type to "Adobe PDF"
-- check printToFile and app language
-- I use QXP 6.1 Passport in Dutch
if printToFile is true then
if language of application "QuarkXPress Passport" is Dutch then
set myPaperSize to "Eigen instelling"
else
set myPaperSize to "Custom"
end if
-- determine new paper width, height and orientation
if paper_width > paper_height then
set paper height to (paper_width + 20)
set paper width to (paper_height + 20)
set myOrientation to landscape
else
set paper width to (paper_width + 20)
set paper height to (paper_height + 20)
set myOrientation to portrait
end if
set fit in area to false
else
set myPaperSize to "A4"
if paper_width > paper_height then
set myOrientation to landscape
else
set myOrientation to portrait
end if
set fit in area to true
end if
set paper size to myPaperSize
set orientation to myOrientation
set paper offset to 0
set page gap to 0
set reduce or enlarge to 100
set page position to center position
-- print document settings
set seperation 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 to centered
set registration marks offset to 6
set tiling to off
-- print output settings
set print colors to composite CMYK
set resolution to 2400
set halftone screen to 150
-- print options settings
set flip horizontal to false
set flip vertical to false
set invert image to false
set print quality to normal
set full res rotated objects to false
set data format to binary data
-- set bleed to 3
end tell
-- custom bleeds settings
tell custom bleeds setup 1 of myDoc
set bleed to 3
set bleed clipping to false
set bleed type to symmetric
end tell
-- save myDoc
-- just print 1 page (time saving)
if printToFile is true then
print page 1 of myDoc PostScript file PostscriptDoc OPI include images
else
print page 1 of myDoc OPI include images
end if
-- close myDoc saving no
-- quit
end tell
end repeat
This how my quark doc looks like, and the wrong PDF. A correct PDF should have the black box bleed 3 mm over the registration marks.
What’s up with the old posts in this topic?
i was also having problems with QXP 6.1 getting bleeds to show up on the .ps files. Sometimes they would be fine but sometimes they would disappear using the same exact script. After reading your post, i tried disabling the custom bleed xtension and that seems to do the trick (as long as you want a symmetric bleed). perhaps this might help you?
my script now:
– picks the Acrobat PostScript Printer
tell application “Printer Setup Utility”
activate
set current printer to printer “AcrobatDistiller”
quit
end tell
– defines path to FTP drive
set savePath to “FTP:N048:In:”
– prompts user for page number to print
set PageNum to text returned of (display dialog “Which page do you want to print?” default answer “”)
set PageNum2 to PageNum as integer
– sets file name, with dud being the default
if PageNum2 > 99 then
set PSName to (PageNum & “.ps”)
end if
if PageNum2 > 9 and PageNum2 < 100 then
set PSName to (“0” & PageNum & “.ps”)
end if
if PageNum2 < 10 then
set PSName to (“00” & PageNum & “.ps”)
end if
tell application “QuarkXPress”
activate
– makes sure there is a document open
if (exists document 1) is false then return beep
tell document 1
–place your print properties here
tell print setup
set printer type to “Acrobat Distiller”
set absolute overlap to true
set auto tile overlap to “3"”
set back to front to false
set bleed to “.25"”
set collate to false
set data format to binary data
set fit in area to false
set flip horizontal to false
set flip vertical to false
set full res rotated objects to false
set halftone screen to “400”
set include blank pages to false
set invert image to false
set orientation to portrait
set page gap to “0"”
set page position to center horizontal
set paper offset to “0"”
set paper size to “Custom”
set paper width to “9"”
set paper height to “11.125"”
set print colors to composite CMYK
set print quality to rotate
set print spreads to false
set print thumbnails to false
set reduce or enlarge to “100%”
set registration marks to centered
set registration marks offset to “20 pt”
set resolution to 2400
set separation to false
set tiling to off
end tell
print page PageNum PostScript file savePath & PSName
end tell
end tell
Thanx, it seems to do trick.
the problem i am now facing is that images seem to be low-res… when pdf is generated from the automated postscript file… maybe i am overlooking something… have to look a bit deeper into it
seems like we are still on the same page. I have been trying to work out the file picture embedding problem by trial and error with my publisher/printer. according to her, when she tries to rip the PDFs that I created she gets errors that say the pics are not embedded properly, but if she just ignores the errors they rip fine.
this is the latest version of the code i have been working with, but i have not yet got feedback about the quality of the PDFs that this creates.
the beginning of the code is the same as my earlier post. OPI should only be active if you are actually using an OPI system to embed the high res linked files.
Also make sure that before you run your script that all your linked images are not missing or modified in the Usage (F13) window. I don’t think there is a way to update them with the appleScript. you have to do it manually.
tell application “QuarkXPress”
activate
– makes sure there is a document open
if (exists document 1) is false then return beep
tell document 1
–updates the linked pictures (i think)
do updates
–sets OPI settings
tell OPI setup 1
set OPI active to false
set include TIFF to true
set include EPS to true
end tell
–sets print settings
tell print setup
set printer type to “Acrobat Distiller”
set absolute overlap to true
set auto tile overlap to “3"”
set back to front to false
set bleed to “.25"”
set collate to false
set data format to binary data
set fit in area to false
set flip horizontal to false
set flip vertical to false
set full res rotated objects to false
set halftone screen to “400”
set include blank pages to false
set invert image to false
set orientation to portrait
set page gap to “0"”
set page position to center horizontal
set paper offset to “0"”
set paper size to “Custom”
set paper width to “9"”
set paper height to “11.125"”
set print colors to composite CMYK
set print quality to normal
set print spreads to false
set print thumbnails to false
set reduce or enlarge to “100%”
set registration marks to centered
set registration marks offset to “20 pt”
set resolution to 2400
set separation to false
set tiling to off
end tell
print page PageNum PostScript file (savePath & PSName) OPI include images
end tell
end tell
i havent’ figured out why yet, but the code below create’s perfect ps files (with perfect images) from the same native files i used yesterday… (giving me pdf files with only low-res images) the only thing i changed is that i shuffled my code (put some code parts on different places in my script and changed some tell statements)
i am not 100% sure it actually works, still testing, but thought to share it first… maybe it could help you fix your problem
set QuarkXPressDoc to "myHD:0643003X_achter"
set PostscriptDoc to "myHD:Postscript_Pdf:RC:IN:0643003X_achter.ps"
try
with timeout of 1800 seconds
tell application "QuarkXpress Passport"
activate
open QuarkXPressDoc as alias use doc prefs yes remap fonts no do auto picture import yes
set myDoc to document 1
-- determine new paper width, height and orientation
set paper_width to (page width of myDoc) as number
set paper_height to (page height of myDoc) as number
if paper_width > paper_height then
set newPaperHeight to (paper_width + 20)
set newPaperWidth to (paper_height + 20)
set myOrientation to landscape
else
set newPaperWidth to (paper_width + 20)
set newPaperHeight to (paper_height + 20)
set myOrientation to portrait
end if
-- determine program language
if language is Dutch then
set myPaperSize to "Eigen instelling"
else
set myPaperSize to "Custom"
end if
tell print setup of myDoc
-- print setup settings
set printer type to "Adobe PDF"
set paper size to myPaperSize
set paper width to newPaperWidth
set paper height to newPaperHeight
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 myOrientation
-- print document settings
set seperation 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 to centered
set registration marks offset to "6 pt"
set tiling to off
-- print output settings
set print colors to composite CMYK
set resolution to 2400
set halftone screen to 150
-- print options settings
set flip horizontal to false
set flip vertical to false
set invert image to false
set print quality to normal
set full res rotated objects to false
set data format to binary data
set bleed to 3
end tell
print every page of myDoc PostScript file PostscriptDoc
quit saving no
end tell
end timeout
end try
thanks for the info.
I was going to ask for a copy of what you have been running.
I’ll try it out and let you know how it goes…