Help required with Quark print query, please...

Hi there,

I’ve written a script that batch prints a selection of Quark docs.
The script works fine apart from one small niggle, that being with the OPI settings.
According to the dictionary I should be able to set what I want to happen OPI wise.

I’ve tried this a number of ways but I get an error saying that the command isn’t recognised. I’m trying to set the OPI to ‘omit TIFF and EPS’.

Please can someone point me in the right direction.

Thanks in advance,


Hi Nik

tested this bit in a larger quark print script (ignore my variables!etc… just take the bits you need)
and got some good results omiting tiffs and eps’s

tell application "QuarkXPress"
			tell document 1
				tell print setup
					set printer type to artwork_printer
					set paper size to the_choice
					set fit in area to true
				end tell
				tell OPI setup 1
					set include TIFF to false
					set include EPS to false
				end tell
			end tell
		end tell

It looks like it is a parameter of print, not of print setup. Maybe you had it in the wrong place?

It should go on the print line, which should be in the tell application “QuarkXPress” block, but not inside a tell document block.

print front document copies 2 OPI omit TIFF and EPS

Does any of that help? If not, post your code and maybe we can figure out what is wrong.

EDIT: Sorry, I just tested it and it doesn’t actually work. It does compile so I thought it was OK. Sorry about that.

Model: G5 Tower (not Intel) - Script Editor ver 2.1.1
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

Hi there,

Thanks to both of you for the help with this one.

I’ve tried implementing the code in a few ways but when printing the hires pic info is still being included - going by the file size that is. If I print the file manually I get a file size of 512K however the script produces files of 170mb???

Here’s the section of code that does the printing:-

tell document 1
				set vertical measure to millimeters
				set horizontal measure to millimeters
				set MyDocWidth to width of bounds of current page as real
				set MyDocHeight to height of bounds of current page as real
				set properties of print setup to {printer type:"Prinergy Refiner", paper size:"custom", paper width:MyDocWidth + 50, paper height:MyDocHeight + 50, bleed:25 as millimeter units, orientation:portrait, page position:center position, print colors:composite CMYK, resolution:2400, halftone screen:175, print spreads:false, reduce or enlarge:"100%", registration marks:centered, include blank pages:true, paper offset:0 as point units, page gap:0 as millimeter units, separation:false, print thumbnails:false, back to front:false, page sequence:all pages, registration marks offset:12 as point units, data format:binary data}
				set include TIFF of OPI setup 1 to false
				set include EPS of OPI setup 1 to false
				--set properties of OPI setup to {omit TIFF and EPS}
				tell OPI setup 1
					set include TIFF to false
					set include EPS to false
				end tell
			end tell
			-- Print the PostScript 
			set theOriginalName to name of front document
			set AppleScript's text item delimiters to "."
			set theName to text item 1 of theOriginalName
			set thePSfile to (ps_folder & theName & ".ps") as string
			print front document PostScript file thePSfile copies 1 OPI omit TIFF and EPS without print dialog
			delay 2
			close front document saving no

The code has the ‘OPI omit TIFF and EPS’ in it to try and achieve what I’m after, this appears in the ‘Options’ tab in the Print dialog. According to the dictionary I should be able to use this but it seems to be ignored???:confused: (Probably more a case of me not using it correctly!):expressionless: (Just read your suggestion again Matt – Yeah, I’d tried that and couldn’t understand why it wasn’t working yet it compiles ok???)

The script compiles ok and executes however I’m still getting the large file sizes.

Any further help be appreciated with this one please,

Thanks again in advance,


EDIT: I didn’t say with the original post, I’m using Quark 6.52.

EDIT2: Whilst searching for an answer to this I’ve found a posting in another forum outlining a similar problem. They wondered if it could be a bug with Quark applescript?

Hey Nik

Sorry about first attempt just realised it gets rid of the tifs & eps’s altogether.
Sent a test to my printer and got a blank page (doh!)

been playing around with the print line and i am getting very different file sizes from changing the options [OPI omit TIFF / omit TIFF and EPS / include images]
which says something is working, so maybe your right and it is a little buggy,
Here’s what i used to test creating postscript files.

tell application "QuarkXPress"
	set docName to name of document 1
	tell document 1
		set DestFolder to (choose folder) as text
		set MyPageWidth to ((width of bounds of current page) as millimeter units) as real
		set MyPageHeight to ((height of bounds of current page) as millimeter units) as real
		set SpreadPages to count of pages of spread 1
		set MySpreadWidth to MyPageWidth * SpreadPages
		tell print setup
			set printer type to "Adobe PDF"
			set paper size to "Custom"
			set print spreads to true
			set fit in area to false
			set reduce or enlarge to "100%"
			set paper width to (MySpreadWidth + 20) as millimeter units
			set paper height to (MyPageHeight + 20) as millimeter units
			set bleed to 5 as millimeter units
			set orientation to portrait
			set page position to center position
			set print colors to composite CMYK
			set resolution to 2400
			set registration marks to centered
			set registration marks offset to 14.173
			set include blank pages to true
		end tell
		set filePath to DestFolder & docName & ".ps"
		print copies 1 cover page no OPI omit TIFF and EPS PostScript file thePSfile without print dialog
	end tell
end tell


only real difference i can see is i have the postscript file bit at the end try changing the different options to see what results (filesizes etc…) you get

Hi Pidge,

Thanks for the help with this one, it’s much appreciated.

I’ll have a play around with the code you’ve posted and change my script accordingly and let you know how I get on.
As you’ve mentioned, it could be something to do with the options.



Hey Pidge,

Thought I’d post an update on this one, thanks again for your input.

I had a play with your script however I still came up with a large file size.
I tried removing the OPI XT but then I got an error.

I’d also had a look at some code that someone posted on the Applescript mailing list, again
this produced a large filesize?

Having considered one or two other options I went back to the Quark library and had another read
through and came back with this:-

set OPI active of OPI setup 1 to true

Having put that in my original code along with this:-

set include TIFF of OPI setup 1 to false
set include EPS of OPI setup 1 to false

the script starting producing .ps files of about 500k :slight_smile: rather than 170mb.
I then ran one of the files through our repro system and all seemed ok with
the OPI.

So it looks like adding that line made all the difference.

set OPI active of OPI setup 1 to true

According to the library though this is set to TRUE by default???

Anyway, the script seems to be producing what I want :), I’ll see how it goes
with a few live files.