Class: SetupPageRecord
- Inherits:
-
BiffRecord
- Object
- BiffRecord
- SetupPageRecord
- Defined in:
- lib/surpass/biff_record.rb
Overview
This record is part of the Page Settings Block. It stores the page format settings of the current sheet. The pages may be scaled in percent or by using an absolute number of pages. This setting is located in the WSBOOL record. If pages are scaled in percent, the scaling factor in this record is used, otherwise the “Fit to pages” values. One of the “Fit to pages” values may be 0. In this case the sheet is scaled to fit only to the other value.
Record SETUP, BIFF5-BIFF8:
Offset Size Contents 0 2 Paper size (see below) 2 2 Scaling factor in percent 4 2 Start page number 6 2 Fit worksheet width to this number of pages
(0 = use as many as needed)
8 2 Fit worksheet height to this number of pages
(0 = use as many as needed)
10 2 Option flags:
Bit Mask Contents
0 0001H 0 = Print pages in columns
1 = Print pages in rows
1 0002H 0 = Landscape
1 = Portrait
2 0004H 1 = Paper size, scaling factor,
paper orientation (portrait/landscape),
print resolution and number of copies
are not initialised
3 0008H 0 = Print coloured
1 = Print black and white
4 0010H 0 = Default print quality
1 = Draft quality
5 0020H 0 = Do not print cell notes
1 = Print cell notes
6 0040H 0 = Paper orientation setting is valid
1 = Paper orientation setting not
initialised
7 0080H 0 = Automatic page numbers
1 = Use start page number
The following flags are valid for BIFF8 only:
9 0200H 0 = Print notes as displayed
1 = Print notes at end of sheet
11-10 0C00H 00 = Print errors as displayed
01 = Do not print errors
10 = Print errors as "--"
11 = Print errors as "#N/A!"
12 2 Print resolution in dpi 14 2 Vertical print resolution in dpi 16 8 Header margin (IEEE 754 floating-point value,
64bit double precision)
24 8 Footer margin (IEEE 754 floating-point value,
64bit double precision)
32 2 Number of copies to print
PAPER TYPES:
Index Paper type Paper size 0 Undefined 1 Letter 8 1/2“ x 11” 2 Letter small 8 1/2“ x 11” 3 Tabloid 11“ x 17” 4 Ledger 17“ x 11” 5 Legal 8 1/2“ x 14” 6 Statement 5 1/2“ x 8 1/2” 7 Executive 7 1/4“ x 10 1/2” 8 A3 297mm x 420mm 9 A4 210mm x 297mm 10 A4 small 210mm x 297mm 11 A5 148mm x 210mm 12 B4 (JIS) 257mm x 364mm 13 B5 (JIS) 182mm x 257mm 14 Folio 8 1/2“ x 13” 15 Quarto 215mm x 275mm 16 10x14 10“ x 14” 17 11x17 11“ x 17” 18 Note 8 1/2“ x 11” 19 Envelope #9 3 7/8“ x 8 7/8” 20 Envelope #10 4 1/8“ x 9 1/2” 21 Envelope #11 4 1/2“ x 10 3/8” 22 Envelope #12 4 3/4“ x 11” 23 Envelope #14 5“ x 11 1/2” 24 C 17“ x 22” 25 D 22“ x 34” 26 E 34“ x 44” 27 Envelope DL 110mm x 220mm 28 Envelope C5 162mm x 229mm 29 Envelope C3 324mm x 458mm 30 Envelope C4 229mm x 324mm 31 Envelope C6 114mm x 162mm 32 Envelope C6/C5 114mm x 229mm 33 B4 (ISO) 250mm x 353mm 34 B5 (ISO) 176mm x 250mm 35 B6 (ISO) 125mm x 176mm 36 Envelope Italy 110mm x 230mm 37 Envelope Monarch 3 7/8“ x 7 1/2” 38 63/4 Envelope 3 5/8“ x 6 1/2” 39 US Standard Fanfold 14 7/8“ x 11” 40 German Std. Fanfold 8 1/2“ x 12” 41 German Legal Fanfold 8 1/2“ x 13” 42 B4 (ISO) 250mm x 353mm 43 Japanese Postcard 100mm x 148mm 44 9x11 9“ x 11” 45 10x11 10“ x 11” 46 15x11 15“ x 11” 47 Envelope Invite 220mm x 220mm 48 Undefined 49 Undefined 50 Letter Extra 9 1/2“ x 12” 51 Legal Extra 9 1/2“ x 15” 52 Tabloid Extra 11 11/16“ x 18” 53 A4 Extra 235mm x 322mm 54 Letter Transverse 8 1/2“ x 11” 55 A4 Transverse 210mm x 297mm 56 Letter Extra Transv. 9 1/2“ x 12” 57 Super A/A4 227mm x 356mm 58 Super B/A3 305mm x 487mm 59 Letter Plus 8 1/2“ x 12 11/16” 60 A4 Plus 210mm x 330mm 61 A5 Transverse 148mm x 210mm 62 B5 (JIS) Transverse 182mm x 257mm 63 A3 Extra 322mm x 445mm 64 A5 Extra 174mm x 235mm 65 B5 (ISO) Extra 201mm x 276mm 66 A2 420mm x 594mm 67 A3 Transverse 297mm x 420mm 68 A3 Extra Transverse 322mm x 445mm 69 Dbl. Japanese Postcard 200mm x 148mm 70 A6 105mm x 148mm 71 72 73 74 75 Letter Rotated 11“ x 8 1/2” 76 A3 Rotated 420mm x 297mm 77 A4 Rotated 297mm x 210mm 78 A5 Rotated 210mm x 148mm 79 B4 (JIS) Rotated 364mm x 257mm 80 B5 (JIS) Rotated 257mm x 182mm 81 Japanese Postcard Rot. 148mm x 100mm 82 Dbl. Jap. Postcard Rot. 148mm x 200mm 83 A6 Rotated 148mm x 105mm 84 85 86 87 88 B6 (JIS) 128mm x 182mm 89 B6 (JIS) Rotated 182mm x 128mm 90 12x11 12“ x 11”
Constant Summary collapse
- RECORD_ID =
0x00A1
Constants inherited from BiffRecord
BiffRecord::BIFF_LIMIT, BiffRecord::CONTINUE_RECORD_ID
Instance Attribute Summary
Attributes inherited from BiffRecord
Instance Method Summary collapse
-
#initialize(paper, scaling, start_num, fit_width_to, fit_height_to, options, hres, vres, header_margin, footer_margin, num_copies) ⇒ SetupPageRecord
constructor
A new instance of SetupPageRecord.
Methods inherited from BiffRecord
Constructor Details
#initialize(paper, scaling, start_num, fit_width_to, fit_height_to, options, hres, vres, header_margin, footer_margin, num_copies) ⇒ SetupPageRecord
Returns a new instance of SetupPageRecord.
2058 2059 2060 2061 |
# File 'lib/surpass/biff_record.rb', line 2058 def initialize(paper, scaling, start_num, fit_width_to, fit_height_to, , hres, vres, header_margin, , num_copies) args = [paper, scaling, start_num, fit_width_to, fit_height_to, , hres, vres, header_margin, , num_copies] @record_data = args.pack('v8E2v') end |