Developer's reference PB2XLS for PowerBuilder

Reference > N_XLS_WORKSHEET > of_set_paper

of_set_paper() method

Set the paper format for the printed output of a worksheet

Syntax

worksheet.of_set_paper ( {index} )

Parameters

index (optional)The unsigned integer whose value is the index of paper style. Default 0

The following paper styles are available:

IndexPaper formatPaper size
0 Printer default -
1Letter8 1/2 x 11 in
2Letter Small8 1/2 x 11 in
3Tabloid11 x 17 in
4Ledger17 x 11 in
5Legal8 1/2 x 14 in
6Statement5 1/2 x 8 1/2 in
7Executive7 1/4 x 10 1/2 in
8A3297 x 420 mm
9A4210 x 297 mm
10A4 Small210 x 297 mm
11A5148 x 210 mm
12B4250 x 354 mm
13B5182 x 257 mm
14Folio8 1/2 x 13 in
15Quarto215 x 275 mm
16- 10x14 in
17-11x17 in
18Note8 1/2 x 11 in
19Envelope 93 7/8 x 8 7/8
20Envelope 104 1/8 x 9 1/2
21Envelope 114 1/2 x 10 3/8
22Envelope 124 3/4 x 11
23Envelope 145 x 11 1/2
24C size sheet-
25D size sheet-
26E size sheet-
27Envelope DL110 x 220 mm
28Envelope C3324 x 458 mm
29Envelope C4229 x 324 mm
30Envelope C5162 x 229 mm
31Envelope C6114 x 162 mm
32Envelope C65114 x 229 mm
33Envelope B4250 x 353 mm
34Envelope B5176 x 250 mm
35Envelope B6176 x 125 mm
36Envelope110 x 230 mm
37Monarch3.875 x 7.5 in
38Envelope3 5/8 x 6 1/2 in
39Fanfold14 7/8 x 11 in
40German Std Fanfold8 1/2 x 12 in
41German Legal Fanfold8 1/2 x 13 in

Return value

Integer. Returns 1 if it succeeds and -1 if an error occurs.

Description

Note, it is likely that not all of these paper types will be available to the end user since it will depend on the paper formats that the user's printer supports. Therefore, it is best to stick to standard paper types.
If you do not specify a paper type the worksheet will print using the printer's default paper.

Examples

worksheet.of_set_paper ( 9 )	// set the A4 paper style