quark 6 and number of copies

I am just getting started in scripting so here is where I am getting stuck. I am modifying some code I found here for creating postscript files. If a user makes four copies of a job to a laser printer and then runs the script the postscripts outputs four copies. I want to set my script to set it as one copy. I have seen other scripts for quark that have this “set copies to 1” but is doesn’t work unless iI am putting it in the wrong spot/syntax. I don’t see information for number of copies or page ranges in the qxd dictionary. The strange thing is if you read the postscript code it shows one copy but four pages. Even when you go to page setup it shows one copy but it is not until you save the document does the one copy stick.


I’m not exactly sure what you’re trying to do, but if all you want to do is print a single copy (either to a printer or to a ps file), you don’t need to specify copies at all. The lines:

print document 1 PostScript file PS_file_path


print page i of document 1 PostScript file PS_file_path

will print one copy of the file or a page of a file to the specifed path.

Is this what you’re looking for? If not, post the script or the section of it you’re having trouble with and it’ll be easier to findd a solution.

All the documets I have are only one page so there is no issue of what page to select. What happens is one of our designers prints the qxd file say to a laser printer first and types four copies in the print dialog box then goes to the scripting menu and selects my script I get a postscript file that generates four pages. Whether I distill the .ps file or run it through a rip I get 4 pages of the same job. Some how it remembers the last thing you do. If you go to the print dialog box it shows one copy but gives you four. Now if you go to the print dialog box with the copies showing to one and hit “capture settings” then cancel out of the box and run my script it works.

Ah! I see. I’ve just tested it – manually printing a doc from Quark with multiple copies and then running a script to print a doc. It does seem to carry over the number of copies from the last print job. When you do a second printing manually, the copies box seems to reset to one. I’ll have to mull this one over. The number of copies is not part of the document’s print setup record so I’m interested in seeing how to solve this.

If you haven’t already played around with the print setup record, run the script below to take a look at a document’s print setup record. I find it gives a better sense of what you can set and the syntax than looking at Quark’s dictionary.

tell application “QuarkXPress Passport”
tell document 1
get properties of print setup
end tell
end tell

The properties will appear in Script Editor’s reults pane.