open printing

Typecommand
DictionaryLCS
LibraryLiveCode Script
Syntax
open printing [with dialog [as sheet]]
Summary

Begins a batch print job, which allows more than one card to be printed on a page.

Introduced1.0
OSmac, windows, linux
Platformsdesktop
Example
open printing
open printing with dialog
open printing with dialog as sheet
open printing
repeat with x = 1 to the number of cards
   print card
end repeat
close printing
Values
NameTypeDescription
The result

If the open printing with dialog form is used, and the user cancels the print dialog box, the result is set to "Cancel". if the result is "Cancel" then exit printSomeCards.

RelatedKeyword: card
Property: printTitle, printRowsFirst
Command: cancel printing, print, close printing, revBrowserPrint, answer printer, answer page setup
Object: card
Glossary: print job, command
Securityprinting
Description

Use the open printing command to print multiple cards.

Normally, the print command prints each card on a separate page. If you use the open printing command before issuing the print commands for the cards you want to print, the printing is delayed until all the cards have been specified. This causes the cards to be printed as one batch.

The open printing with dialog form opens the print dialog box on Mac OS systems. On Unix or Windows systems, this form acts like the open printing form, and no dialog box appears. If the as sheet form is used, the dialog box appears as a sheet on OS X systems.

The following handler prints cards that have been collected in a global variable:

on printSomeCards
    global cardsToPrint
    open printing with dialog
    repeat with x = 1 to the number of lines of cardsToPrint
        print card (line x of cardsToPrint)
    end repeat
    close printing -- send group of cards to printer
end printSomeCards

Note: On Linux, the printing commands use revpdfprinter to generate a PDF to send to the system printing system. If building a standalone, make sure you have selected 'revpdfprinter' in the inclusion options.

Tagsprinting