Release 1.6.1 29 June 2005 |
Developer's reference |
![]() |
Reference > N_XLS_WORKSHEET > of_fit_to_pages |
of_fit_to_pages() method
Fit the printed area to a specific number of pages both vertically and horizontally. If the printed area exceeds the specified number of pages it will be scaled down to fit. This guarantees that the printed area will always appear on the specified number of pages even if the page size or margins change.
Syntax
worksheet.of_fit_to_pages (width, height) |
Parameters
Width | The integer whose value is the number of pages horizontally |
Height | The integer whose value is the number of pages vertically |
Return value
Integer. Returns 1 if it succeeds and -1 if an error occurs.
Description
Note that although it is valid to use both of_fit_to_pages() and of_set_print_scale() on the same worksheet only one of these options can be active at a time. The last method call made will set the active option.
Note that of_fit_to_pages() will override any manual page breaks that are defined in the worksheet.
Examples
worksheet.of_fit_to_pages ( 1, 1 ) //fit the worksheet's printed area to one page
© 2003-2005 Desta, Ltd. All rights reserved. | SupportDesk |