janschenkel at yahoo.com
Tue Jan 25 23:22:08 CST 2011
--- On Tue, 1/25/11, Ray Horsley <ray at linkit.com> wrote:
> I'm printing a stack of 10 cards. Cards 2, 4 and 6
> display a URL via the
> revBrowser commands while the others do not. The
> following script does not
> work since each time the revBrowserPrint command is called
> the script
> continues to execute without waiting for the user to
> dismiss the print
> dialog which revBrowser produces (and it's seems there's no
> way to suppress
> the dialog).
> on printStack
> repeat with C=1 to number of cards
> go cd C
> put the BrowserId of this cd into
> if myId is a number then
> else print this cd
> end repeat
> end printStack
> Wrapping the same kind of a script in 'open printing' and
> 'close printing'
> also fails since revBroswerPrint seems to be oblivious to
> 'open printing'.
> I've tried inserting an answer command to confirm printing
> each card. This
> seems to work but then even this gets ahead of the
> revBrowserPrint as the
> answer dialog window starts coming up on top of a
> previously displayed print
> dialog produced by revBrowserPrint which the user hasn't
> dismissed yet (and
> need to dismiss first or printing gets out of order).
> Anybody with any ideas on how to work around this?
> Ray Horsley
> LinkIt! Software
Sorry to disappoint you, Ray, but revBrowserPrint is completely separate from LiveCode's built-in printing mechanism: it merely asks the embedded browser control (WebKit on MacOSX, InternetExplorer on Windows) to print as if the user had gone to the regular browser application and clicked the 'Print' button there.
This means none of the LiveCode print properties and commands have any influence (printPaperOrientation, printRanges, printCopies and printerName to point out the obviously interesting ones) on how the browser decides to print - and it won't work "silently" either.
Quartam Reports & PDF Library for LiveCode
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
More information about the use-livecode