Indesign CS3 - print to Fiery workaround?

I am writing an AppleScript that will open an InDesign document, print it to a Fiery RIP-driven Canon as well as another printer.
This AppleScript will be distributed to everyone in my department, so I’m trying to make it dummy proof, (i.e. - no user setup/interaction required).

Here is the origin of my issue:
There is a printing bug in the interaction between ID, intel-based Macs, Leopard and Fiery, that causes every page following the first one to rotate 90°
This only happens when printing horizontal (landscape) documents.

The workaround is to click the “Page Setup…” button in ID’s print dialog, set the printer and paper size.
Then set ID to use “Defined By Driver” as the paper size.

The problem is that most of our jobs are printed on 11x17 paper so telling ID’s print preferences to use “defined by driver” defaults to 8.5x11.

On my own computer, I simply set the default paper size in the System Preferences/Print & Fax to “Tabloid.”

However, as I mentioned, this AppleScript needs to be as dummy proof as possible.

Is there a way to set the default paper size in the System Preferences/Print & Fax with AppleScript?

Thanks.

Can’t answer your question directly but I had another idea. What if you open the file in InDesign and instead of just printing, you check to see if it is a portrait or landscape document. If landscape then repeat through the number of pages and print each page one at a time. That way, you are only sending 1 page documents to the printer.

In pseudo-code:

Open Indesign
open the document
if the height is greater than the width then just print normally
else
repeat with x from 1 to the count of the pages
print page x
end repeat
end if

Thanks for the reply.

The workaround I am implementing now is to print it to a PDF and then have Acrobat send it to the printer, since the issue is only when printing from ID.

Cool. I did a similar workaround a while back because our rip for some bizarre reason does not let you print separations. It puts them back together into a composite image. I had to print seps to a PDF and then send that PDF with multiple greyscale pages to the printer.

I found I could print the PDF really quickly and without Acrobat with the shell script lpr but honestly it might be difficult to use in your situation. You don’t have a lot of control over the page orientation and other print options. You can set the paper to letter or tabloid however. Here is the basic code to do that if you want to experiment:

set PathToDesktop to path to the desktop as text
set fileBase to "YourInDesignFileName"
set thisPath to POSIX path of (PathToDesktop & fileBase & ".pdf") --Shell script needs POSIX path so set up path for shell script
set theShell to ("lpr -P " & "Printer_Name" & " " & (quoted form of thisPath) & " -o media=letter")
do shell script theShell