Quark XPress 6.5 print to PDF batch processing

I am trying to batch process QXD files by printing to PDF, one by one. This is a start to the script I am working on, an update to a pair of scripts that 1) creates a txt file list of the contents of a folder and 2) saves the contents as eps files for combining in Acrobat manually.

In this script, I would like to print to pdf one-by-one. I keep getting Quark crashes after setting the print setup, right at ‘print front document’. I submitted another report to Apple, but have not heard back on one yet… I wonder if Sal is reading these?


set sourceFolder to choose folder with prompt "Please choose a folder of Quark XPress files to print to PDF."
set folderName to name of (info for sourceFolder)
tell application "Finder" to set theFiles to files of folder sourceFolder whose name extension is in {"qxd"} or kind contains "QuarkXPress" or file type is in {"XPRJ", "XPR3"}
repeat with i from 1 to count of theFiles
	set oneFile to item i of theFiles
	set oneFile to oneFile as alias
	tell application "QuarkXPress"
		activate
		open oneFile
		tell print setup of front document
			set separation to false
			set printer type to "Adobe PDF"
			set page position to center horizontal
			set print spreads to false
			set reduce or enlarge to "100%"
			set registration marks to centered
			set tiling to off
		end tell
		print
		close saving no
	end tell
end repeat

Model: Dual 2.3GHz G5
AppleScript: 2.1.1/Script Debugger 4
Browser: Firefox 2.0.0.6
Operating System: Mac OS X (10.4)

Hi,

Same type of thread already in quark forum. Refer it.

http://www.quark.com/service/forums/viewtopic.php?t=20039

Vaasu

Browser: Safari 419.3
Operating System: Mac OS X (10.4)

I have tried to tackle the same problem. Quark crashing is probably not because you did anything wrong in your script. Quark 6.5 is such a shoddy, poorly written program its a wonder it works at all. It is a nightmare to script. The only way I could get this to work for me was to write a script that prints EPS files to a watched folder. Even this does not work 100% of the time. Quark also has a fun little bug where it has trouble opening a window if a previous window was closed by a script. I had to write a loop that forces windows open. If you want, I can post the script I wrote.

Jonathan

Hi,

I’m resurrecting this thread because this is exactly what I’m trying to do. I used the script above and it works to a point. It asks for the folder, opens the document, but then gives an error message “Quark XPress got an error: Can’t continue print”. Could this be because the document comes up with a message such as “page could contain eps pictures…” or other message requiring an answer? If so, is there a way to make it print anyway?

Any help would be appreciated. I am not an experienced scripter.

G5 has Applescript 1.10.7 running under OSX 10.4.11

(Background if you want it… I am getting rid of an older G5 computer but it’s the only one that still has a working version of XPress 6.52. We don’t use Quark anymore and haven’t upgraded. I just need a pdf version of all these old files so that I can look at them in future if necessary.)

  • V.

Hi,

you may use

		open oneFile do auto picture import no

and I would add a timeout of 300 or more to avoid timeout error causing of bigger files …