×
Menu
Index

NewPage

 
 
  • NewPage( [page size], [orientation], [lines], [columns], [user size], [Coord System], [left margin], [top margin] ) => starts a new page, specifying the page size, orientation and the coordinates system used.
 
 
Page size (numeric) : is a page format reference as in XBPDEV.CH. The page size defaults to XBPPRN_FORMAT_LETTER, valid page sizes are :
Letter
230 x 275
8 1/2 x 11
LetterSmall  
230 x 279
8 1/2 x 11
Tabloid
279 x 432
11 x 17
Ledger  
432 x 279
17 x 11
Legal
203 x 356
8 1/2 x 14
Statement
127 x 203
5 1/2 x 8 1/2
Executive
184 x 254
7 1/4 x 10 1/2
A3
297 x 420
 
A4
210 x 297
 
A4 Small  
210 x 297
 
A5
148 x 210
 
B4
250 x 354
 
B5
182 x 257
 
Folio
203 x 330
8 1/2 x 13
Quarto
215 x 275
 
10 x 14 in
254 x 356
10 x 14
11 x 17 in
279 x 432
11 x 17
Note
203 x 279
8 1/2 x 11
Envelope #9
98 x 225
3 7/8 x 8 7/8
Envelope #10
105 x 229
4 1/8 x 9 1/2
Envelope #11
102 x 264
4 1/2 x 10 3/8
Envelope #12
102 x 179
4 3/4 x 11
Envelope #14
127 x 279
5 x 11 1/2
C size sheet
432 x 558
17 x 22
D size sheet
558 x 864
22 x 34
E size sheet
864 x 1118
34 x 44
DL
110 x 220
 
C5
162 x 229
 
C3
324 x 458
 
C4
229 x 324
 
C6
114 x 162
 
C65
114 x 229
 
B4
250 x 353
 
B5
176 x 250
 
B6
176 x 125
 
Envelope Italy
110 x 230
 
Monarch
98 x 191
3 7/8 x 7 1/2
Envelope Personal
92 x 165
3 5/8 x 6 1/2
US Standard Fanfold
378 x 279
14 7/8 x 11
German Standard Fanfold
216 x 305
8 1/2 x 12
German Legal Fanfold
216 x 330
8 1/2 x 13
 
Orientation (numeric) : is the page orientation, portrait or landscape, and defaults to XBPPRN_ORIENT_PORTRAIT.
 
Lines (numeric) : is the number of lines in the page, this number is related to the chosen coordinate system (see bellow). Default is 66 lines per page.
 
Columns (numeric) : the number of character columns in each line, this number is also related to the coordinate system. Default is 80 characters per line.
 
User size (array) : is a two element array that specifies page dimensions, first element is horizontal size, and second element is vertical size. This parameter is only used for page size XBPPRN_FORMAT_USER, and the measures should be in 1/72 inches. A page with 3 x 5 inches should be informed as { 216, 360 }.
 
Coordinate system (numeric): the coordinates system specifies the type of coordinates (line, column) passed to the class, they can be :
0 = CLIPPER
Line, Column, Top Down (Clipper style)
1 = GRA_PU_PIXEL
Pixels, Bottom Up
2 = GRA_PU_LOMETRIC
0.1 Millimeters, Bottom Up
3 = GRA_PU_HIMETRIC
0.01 Millimeters, Bottom Up
4 = GRA_PU_LOENGLISH
0.01 Inches, Bottom Up
5 = GRA_PU_HIENGLISH
0.001 Inches, Bottom Up
6 = GRA_PU_TWIPS
1/1440 Inches, Bottom Up
7 = MILLIMETERS
1 Millimeters, Bottom Up
101 = PIXEL TOP/DOWN
Pixels, Top Down
102 = LOMETRIC TOP/DOWN
0.1 Millimeters, Top Down
103 = HIMETRIC TOP/DOWN
0.01 Millimeters, Top Down
104 = LOENGLISH TOP/DOWN
0.1 Inches, Top Down
105 = HIENGLISH TOP/DOWN
0.01 Inches, Top Down
106 = TWIPS TOP/DOWN
1/1440 Inches, Top Down
107 = MILLIMETERS TOP/DOWN
1 Millimeters, Top Down
 
left margin (numeric) : left margin for the document, default is one character.
 
top margin (numeric) : top margin for the document, default is one line.  The top margin is ignored if you are using a bottom/up coordinate system.
 
Examples :   oPdf:NewPage( XBPPRN_FORMAT_A4 ) will create a page in the A4 format, oriented portrait, with 66 lines and 80 columns, using line/column coordinate system.
 
oPdf:NewPage( XBPPRN_FORMAT_LETTER, , 660, 800 ) will create portrait oriented page, letter size, with standard line/column coordinate system, but with 660 lines per page and 800 characters per line, creating a smaller line/character feed, that could provide better precision in positioning elements on the page.
 
oPdf:NewPage( XBPPRN_FORMAT_LETTER, , , , 3 ) this page will have letter size, but will be using HIMETRIC coordinate system.
 
oPdf:NewPage( XBPPRN_FORMAT_USER,  , 30, 70, { 504, 360 }) this page will be sized at 5 x 7 inches providing 30 lines with 70 characters in each line, notice that the horizontal dimension (504) is larger that the vertical (360), indicating that the paper will be at a landscape position.