Printing with Distiller in QuarkXpress

Hi Folks,

I’m new in this mailing list, I’m trying to print my Quark document by “Adobe PDF” printer to get a PDF file in a specific destination folder, I can set the printer to “Adobe PDF” by a Applescript, then, In order to make my own path to assigning to new generated PDF, I need to get the path of Quark.
My first question is how can I get the Quark path with Applescript?
Second, how can I set this path for new generated PDF file when using Distiller?

I just play around this issue, think is not possible to give the path as a destination path to Distiller before you start printing, every times the PDF file will located in Desktop folder. ( i don know where is this default folder has been set).

I appreciate of any help for this issue,




Are you asking for the path to Quark the application or the path to the Quark document?

tell application "QuarkXPress"
	set thepath to file path of front document as text
end tell

That will return the file path of the document you’re working with.

I hope I’m understanding correctly… you want to place the postcript file to the same folder as the document is located and then run it through Distiller?

tell application "QuarkXPress"
	set thepath to file path of front document
end tell

--get folder that the quark document is in
tell application "Finder"
	set thefolder to folder of thepath as Unicode text
end tell

--going back to quark and printing the postcript file to the document folder
tell application "QuarkXPress"
	--I like to use the document name by default for my postscript files
	set filename to name of front document as text
	--place and edit your print settings here
	tell print setup
		set absolute overlap to true
		set auto tile overlap to "18p"
		set back to front to false
		set bleed to "1p"
		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 "150"
		set include blank pages to false
		set invert image to false
		set orientation to portrait
		set page gap to "0p"
		set page position to left position
		set page sequence to all pages
		set paper offset to "0p"
		set printer type to "Prinergy Refiner"
		set paper size to "Custom"
		set paper width to "54p"
		set paper height to "70p6"
		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 "12 pt"
		set resolution to 2400
		set separation to false
		set tiling to off
	end tell
	--print poscript file
	print PostScript file thefolder & filename & ".ps"
--optional save and close
close front document saving yes
end tell

--set the path to the postscript file
set thepsfile to thefolder & filename & ".ps"

--distill the postscript file
tell application "Acrobat Distiller 6.0.1"
	open thepsfile as alias
end tell

Hope this helps you,


Just a note.

If you’re processing larger files, you may want to add a handler that checks the size of the .ps file that is being written to make sure that Distiller doesn’t grab it before it’s completed.


Adam Bell has a nice “wait for file” handler in the Code Exchange section to reference.