Quark To Pdf Script

I know I should learn this for myself but I need a fast solution. Is there a mostly prewritten script for exporting a QuarkXpress 6.5 file to PDF or EPS from the DESKTOP in MacOSX 10.3.6. I am spending FAR TOO MUCH time having to export each document individually. There are over 200 of them weekly each taking about 1-3 minutes each. I have more important thing to spend 6.5 hours on.

PS I know next to nothing about scripting but have made it a priority to master this.

Rich

Rich,

Have you got anywhere with this yet? I have similar need. There is an “export all pages as EPS” script included with Quark, but it doesn’t handle error messages. This might be a good place to start.

My problem is I need to convert to PDF all files in subfolders in a folder that have changed since yesterday!

Not getting very far.

Regards,

Simon (UK)

Hi Rich–

I am trying to batch export quark files to pdfs just using default settings. I just want to get the damn script to say “quark, export document 1 as pdf” that’s it. I have no idea how to get it to work. I can make it a droplet once it works, but it should be simple. Let me know if you hear anything.

MS

I’ve not tested this, but it’s basically a quick excerpting of a script I use to print PDFs from Quark 6.5. Good luck.

on open theFiles
	tell application "Finder"
		set thePath to (path to current application)
		set thePath to folder of thePath
		set thePath to thePath as string
		set thePathLen to length of thePath
	end tell

	repeat with qxpName in theFiles
		tell application "Finder"
			--============================================
			-- You must set the following to work with your local computer
			set outPath to "YourMacHD:Your PDF:Folder:" as alias
			--=============================================
			set qxpName to qxpName as string
			set pdfName to qxpName & ".pdf"
		end tell
		
		tell application "QuarkXPress"
			activate
			try
				set qxpName to qxpName as alias
				open qxpName use doc prefs yes remap fonts no with reflow
			on error errmsg number errnum
				beep
				display dialog errmsg & " [" & errnum & "]" buttons {"1st Try"} default button 1 with icon stop
				return
			end try
			
			-- get page dimensions to use in printing
			tell document 1
				set pageWidth to page width
				set pageHeight to page height
			end tell
			
			tell print setup of document 1
				set print spreads to false
				set orientation to portrait
				set printer type to "Generic Imagesetter"
				set separation to false
				set registration marks to off
				set paper width to pageWidth
				set paper height to pageHeight
			end tell
			
			print every page of document 1 PostScript file (pdfName)
			close document 1 without saving
		end tell
	end repeat
end open

Hey! Your script works just like I need it to. The quark files, when moved to the droplet indeed make pdf files.

One problem we are having that maybe you can shed some light on:
Acrobat tells us that the pdf files that are created are corrupt. I tried changing your printer description to “Adobe PDF” and it also worked, but we got the same error message.

Any help would be greatly appreciated!

Thanks so much.

Hi,

Is there an eaisy way to modify this script so that each page of a quark document is generated as a seperate pdf? This would be of incredible help. I’d like to learn scripting eventually but really don’t have time during the school year. This seems like a great resource.

Thanks so much,
Fraser

Hi,
I’ve just tested it but I get an error message:
Can’t set <> of <> of documnet 1 of application “QuarkXPress Passport” to “PDB_Printer”.

PDB_Printer is the name of our default printer.

Does anyone have an idea?

(I’m sorry for my english, I’m from Germany)

Best regards
Gerd

Model: PB G4 1 GHz
AppleScript: 1.9.3
Browser: Safari 312
Operating System: Mac OS X (10.3.9)

Make “Generic Imagesetter” as default printer.

Or Make a watch folder using Acrobat distiller and using move command in AS you will have to move the files in the IN folder of watch folder.

Thanks
Rajeev