can find thread save quark 6 using save as PDF

I know someone has asked this before but I can’t find it

How to save quark 6 using save as PDF

Directly scripting the Export Layout as PDF is not possible without System Events, which can be a little sketchy. Here is a scipt I have been using for a long time that works consistently. It saves the file to a .ps file and has Distiller distill the PDF. Save it as just a plain script (not an application or bundle) and then put it in the Applications/Quark Xpress/Scripts folder and it will show up in the Quark Applescript menu. Run it on whatever document you have open.

property RegMarks : ""
property PDFResolution : ""

set PathToDesktop to path to the desktop as text

if RegMarks = "" or PDFResolution = "" then
	try
		set RegMarks to the button returned of (display dialog "Registration marks?" buttons {"Yes", "No", "Cancel"} default button "Yes") as text
	on error
		return
	end try
	set PDFResolution to the button returned of (display dialog "High Res or Low Res PDF?" buttons {"High Res", "Low Res", "BOTH"} default button "Low Res")
else
	try
		set ChangeInputQuery to the button returned of (display dialog ("Registration Marks: " & RegMarks & return & "PDF Resolution: " & PDFResolution & return & return & "Continue with these settings?") buttons {"OK", "Change", "Cancel"} default button "OK")
	on error
		return
	end try
	if ChangeInputQuery = "Change" then
		try
			set RegMarks to the button returned of (display dialog "Registration marks?" buttons {"Yes", "No", "Cancel"} default button "Yes") as text
		on error
			return
		end try
		set PDFResolution to the button returned of (display dialog "High Res or Low Res PDF?" buttons {"High Res", "Low Res", "BOTH"} default button "Low Res")
	end if
end if

tell application "Finder"
	if not (exists folder "PDF Folder") then
		make new folder at desktop with properties {name:"PDF Folder"}
	end if
end tell

tell application "Acrobat Distiller 7.0"
	launch
end tell

tell application "QuarkXPress"
	activate
	if not (exists document 1) then
		try
			display dialog "No document open!" buttons "Cancel" default button "Cancel"
		on error
			return
		end try
	end if
	tell custom bleeds setup 1 of document 1
		set bleed type to asymmetric
		set bleed to {"0\"", "0\"", "0\"", "0\""}
		set bleed clipping to false
	end tell
	display dialog "Printing PS File" buttons " " giving up after 1
	tell front document
		set horizontal measure to inches
		set vertical measure to inches
		set DocWidth to the page width of it as real
		set DocHeight to the page height of it as real
		tell print setup
			set printer type to "AdobePDF 7.0"
			set paper size to "custom"
			set registration marks to off
			if RegMarks is "Yes" then
				set registration marks to centered
				set DocWidth to DocWidth + 1
				set DocHeight to DocHeight + 1
			end if
			set paper height to DocHeight
			set paper width to DocWidth
			set orientation to portrait
			set separation to false
			set tiling to off
			set page position to left position
			set paper offset to 0
			set page gap to 0
			set reduce or enlarge to 100
			set fit in area to false
			set include blank pages to false
			set print thumbnails to false
			set print colors as grays to false
			set back to front to false
			set print spreads to false
			set page sequence to all pages
			set flip horizontal to false
			set flip vertical to false
			set invert image to false
			set print quality to normal
			set print colors to composite CMYK
			set data format to binary data
			set collate to false
		end tell
	end tell
	set myName to (name of the front document) as text
	set AppleScript's text item delimiters to {"."}
	set fileBase to first text item of (myName as string)
	set PS_file_path to (PathToDesktop & "PDF Folder:" & fileBase & ".ps") as text
	print front document PostScript file PS_file_path
end tell

tell application "Finder"
	repeat while not (exists file (PathToDesktop & "PDF Folder:" & fileBase & ".ps"))
		delay 1
	end repeat
end tell

tell application "Acrobat Distiller 7.0"
	set POSIXPath2PSFile to POSIX path of (PS_file_path as alias)
	set POSIX2LowOutput to POSIX path of (PathToDesktop & "PDF Folder:" & fileBase & "_Lo.pdf")
	set POSIX2HiOutput to POSIX path of (PathToDesktop & "PDF Folder:" & fileBase & "_Hi.pdf")
	set PathToHiResDistill to POSIX path of (("Macintosh HD:Library:Application Support:Adobe PDF:Settings:High Quality Print.joboptions") as alias)
	set PathToLowResDistill to POSIX path of (("Macintosh HD:Library:Application Support:Adobe PDF:Settings:Standard.joboptions") as alias)
	if PDFResolution = "Low Res" or PDFResolution = "BOTH" then
		if PDFResolution = "Low Res" then
			Distill sourcePath POSIXPath2PSFile adobePDFSettingsPath PathToLowResDistill
		else
			Distill sourcePath POSIXPath2PSFile adobePDFSettingsPath PathToLowResDistill destinationPath POSIX2LowOutput
		end if
	end if
	if PDFResolution = "High Res" or PDFResolution = "BOTH" then
		if PDFResolution = "High Res" then
			Distill sourcePath POSIXPath2PSFile adobePDFSettingsPath PathToHiResDistill
		else
			Distill sourcePath POSIXPath2PSFile adobePDFSettingsPath PathToHiResDistill destinationPath POSIX2HiOutput
		end if
	end if
end tell

tell application "Finder"
	repeat while (not (exists file (PathToDesktop & "PDF Folder:" & fileBase & ".pdf"))) and (not (exists file (PathToDesktop & "PDF Folder:" & fileBase & "_Hi.pdf")))
		delay 1
	end repeat
	try
		delete file PS_file_path
	end try
	open folder "PDF Folder"
end tell

beep 1
display dialog ("Finished!") buttons " " giving up after 1

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

Matt Boy,

thansks for you post but unfortunately I’m having a problem when I print to PS where some fonts aren’t embedded but when I use save layout as PDF from quark all the fonts are there and same if I use save as PDF from the print dialog

If I use quark save as PDF function then the file size increase like 60%

mm