FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

pop-up-printer-setup-dialog

Arguments: &key stream min-margins margins orientation disable-margins-p disable-orientation-p disable-paper-p disable-printer-p disable-sample-page-p

Pops up a dialog for setting default printer orientation, paper size, and margins. This is a different dialog than the one that pops up when a printer stream is opened, and is invoked in the development environment with the File | Page Setup command.

If the user cancels from the dialog, then nil is returned.

Otherwise these values are returned:

  1. t to indicate that the user selected OK
  2. the left margin selected on the dialog
  3. the top margin
  4. the right margin
  5. the bottom margin
  6. the orientation selected, either :portrait or :landscape
  7. a keyword denoting the paper size selected; for a list of possible paper-size keywords, see the paper-size property
  8. A keyword denoting the bin from which the paper is drawn. See the paper-source printer property for the possible keywords.
  9. A string naming the port through which printing is done to the selected printer.
  10. A string naming the selected printer itself. This name could be passed later as the value of the :printer-name initarg to open-stream, along with the :no-dialog-p initarg, to programmatically specify this particular printer for the print job (though this printer will be the default anyway unless it is changed again in the meantime).
  11. A string naming the printer driver that is used for the selected printer. This is usually "winspool".

The margins are fixnums specifying thousands of an inch. When this function returns, the following symbols are set to these margins:

Note that drawing on a printer stream does not automatically offset the drawing by some requested margin; instead, it is offset by a physical margin of the particular printer, which is usually around a quarter of an inch. To make it easier to draw at some arbitrary margin, when a printer stream is opened it is given margins that are equivalent to the above global margin variables minus the physical margin of the printer, so that drawing something at the printer's margins will make it appear where the global margin variables indicate. See printer-physical-offset for more information.

The orientation and paper-size selected on this dialog will determine the initial values of these properties on the print job dialog the next time that it appears when a printer stream is opened. Similarly, if the print job dialog is bypassed by passing the :no-dialog-p initarg to open-stream when creating a printer stream for a print job at some later time, then the values that the user selected on this dialog will be used for the print job unless they are programmatically overridden with other initargs to open-stream.

Note that the value of some printer properties may now be nil. If a printer stream is opened using the print job dialog, then the resulting printer object will have nil as the value of any properties for which the printer driver does not support multiple options. For example, if the particular printer driver allows the user to select either :high, :medium, or :low print quality on the print job dialog, then the value of the print-quality property of the printer object will be one of those three symbols, but if the printer driver does not offer a choice of print quality, then the value of the print-quality property will be nil.

Here is more description of the arguments:

See also pop-up-printer-job-dialog.


Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version