The Spool Library: 7.3 Other Printing Components: Page Size Related Routines

Up: GEOS SDK TechDocs | Up | Prev: 7.2 Printer Drivers | Next: 8 Debugging Tips
SpoolGetNumPaperSizes(), SpoolGetPaperString(), SpoolConvertPaperSize(), SpoolCreatePaperSize(), SpoolDeletePaperSize(), SpoolGetPaperSizeOrder(), SpoolSetPaperSizeOrder(), SpoolGetDefaultPageSizeInfo(), SpoolSetDefaultPageSizeInfo()

Most geodes won't be too concerned with what sort of page size choice the user has made. If the document fits on the page, all's well. If the document doesn't fit, the Spooler will tile the job using only as many pieces of paper as necessary. If the document size should be the same as the page size, the geode can send a MSG_PRINT_CONTROL_CALC_DOC_DIMENSIONS to the print control.

There are several routines which deal with page sizes. Most applications have no reason to call these functions, and we will not discuss them in detail here. Some general notes are in order for those programmers who might work with these functions, though.

It takes two indexes to access a page size. The first is the PageType : paper, envelope, or label. Within each type, there are up to MAX_PAPER_SIZES page sizes. To find out the number of page sizes presently defined for a given type, use the SpoolGetNumPaperSizes() routine. To find the number of a paper size associated with a PageType and a given set of dimensions, use the SpoolConvertPaperSize() routine. For the text string describing the size of the page, call SpoolGetPaperString() (the buffer to hold the string should be of size MAX_PAPER_STRING_LENGTH.

To find out the order in which the page sizes of a given type are stored, call SpoolGetPaperSizeOrder() . You may give a new order by calling SpoolSetPaperSizeOrder() . This will affect the order in which page sizes are presented in a page size control.

To create a new page size, call SpoolCreatePaperSize() . This routine takes a page type, a set of dimensions, and a string to describe those dimensions to the user. It returns a new page size number. To destroy a page size, call SpoolDeletePaperSize() .

To find out or change the default page size, call SpoolGetDefaultPageSizeInfo() or SpoolSetDefaultPageSizeInfo() .


Up: GEOS SDK TechDocs | Up | Prev: 7.2 Printer Drivers | Next: 8 Debugging Tips