background image
C H A P T E R 2 1
Routing Interface
Using Routing
in portrait mode (
) or horizontally in landscape mode (
The default value of the
slot is
. Your format should
always use relative view justification and/or check the actual bounds of the print
format by using the
view method. Note that you cannot change the
orientation between a series of pages being printed by a single print format.
If multiple items are being routed (as from a multiple selection in an overview), you
may want to print each item on a separate page or print the items one after another,
placing multiple items on the same page before starting a new page. You can control
this feature by setting the
slot. The default setting of this slot is
If you want to lay out multiple items on a page, set the
slot of the
format to
. In this case, the target object encapsulates all the items being
routed in a single multiple-item object created by
. Your
format should call the
method to return a cursor for this
object, on which you can iterate over the individual items to be routed using the
cursor methods
, and
. If your format can use other print
formats, you can use the
method of the
to find formats for the individual items.
If you want to lay out each item on a separate page, or if this format cannot handle
a multiple-item target object, set the
slot to
. In this case, this
format is invoked multiple times, once for each item being routed, and each item
begins on a separate page.
Printing and Faxing
When an item in the Out Box is actually printed or faxed using your print format,
the view represented by the print format is instantiated and drawn to the output
device. As when any view is instantiated, the system sends the print format view
standard messages and also routing-specific messages. For optimal printing
performance, and to avoid timing out a fax connection, you need to be aware of the
sequence of events and know which operations are time-critical.
Here is the sequence of events during a printing or faxing operation:
1. The transport sends the print format the
message, to give
you an opportunity to perform initialization operations. You must perform any
lengthy initialization operations in this method, before the transport connection
is made. You can store initialized data in
. For more information about
, see Newton Programmer's Reference.
2. For sending a fax only, the transport sends the print format the
message. If you can determine the number of pages in the fax ahead of time, you
should override this method in your print format and have it return the number
of pages (not including the cover page). If you don't override this message, the
transport opens the print format view in an offscreen window and performs steps
3, 4, and 6, below, to go through each page so it can count the number of pages.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна