PrintToPDF and double sided printing?


#1

I’m attempting to use the printtopdf statement to print directly to my default printer. For default printing, it works great.

I would like to set the “2 sided” option to on so I can print on both sides of the paper. is there an option to designate this using printtopdf?

Also - a procedure with:
pagesetup
print dialog

doesn’t print - but the page setup dialog does appear.

a procedure with:
print dialog

prints just fine - the dialog pops up, I can select desired options and click “OK” to start printing.

Is there some reason the print dialog statement is not executed following a pagesetup statement…? Given that it works fine alone…?


#2

Sorry, no. Only standard Apple options are supported. Two sided printing is not an Apple option, but rather an option provided by your printer driver, so there is no API available to control that. (In other words, it is not possible for ProVUE to control this option. If it was possible, I would add that – I’ve also got a printer with the 2 sided option!)

This is a known bug with the print related dialogs. For some reason, these dialogs (which are generated by Apple’s code) stop the execution of Panorama code. The same problem occurs with the print dialog statement, any following code does not run. I have not been able to figure out how to work around this problem.


#3

Am I to understand from this thread that you can not do 2 sided printing with Panorama X? I don’t have a printer that can test it.


#4

But you can easily print to Preview or Acrobat which do have 2-sided printing capability. If you know how to use Applescript (I don’t), you could probably embed an Applescript widget in a PX program to automate it.


#5

I will experiment with the Applescript idea - thanks!

I’m not sure… but… if I put

 pagesetup
 beep

in a procedure, the beep sounds while the Page Setup dialog box is still displayed (before I click “OK”). This implies that the app isn’t trapping the “visible dialog” state and waiting for either “OK” or “Cancel”. The procedure appears to simply go on to the next statement…

If I put

pagesetup
beep
local startTime
startTime=now()
loop
    nop
until now()>startTime+10
print dialog

in a procedure, I get the page setup dialog, hear the beep, then get the spinning beach ball for 10 seconds - before I am able to click the “OK” button on the original dialog box - but, as confirmed earlier, no print action.

The buttons in the Page Setup dialog don’t respond until after the procedure loop has finished and the spinning beach ball disappears.

This seems to imply (confirm?) that the application has not stopped to wait for a confirmation “OK” or “Cancel” before going on to the next line of code in the procedure when the “pagesetup” statement is called.

If the Apple page setup dialog is stopping the procedure, how is the beep sounding? How is the beach ball appearing for exactly 10 seconds (the loop) before I am able to click “OK” in the Page Setup dialog?


#6

No, you are not. You can print 2 sided all day long, but you have to do so by picking that option with the print dialog. As far as I know, you cannot do 2 sided printing using the printtopdf statement.