MCPcopy Create free account
hub / github.com/apache/poi / PrintSetupRecord

Class PrintSetupRecord

src/java/org/apache/poi/hssf/record/PrintSetupRecord.java:34–366  ·  view source on GitHub ↗

Title: PAGESETUP (0x00A1) Description: Stores print setup options -- bogus for HSSF (and marked as such) REFERENCE: PG 385 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) REFERENCE: PG 412 Microsoft Excel Binary File Format Structure v20091214 @author Andrew C. Oli

Source from the content-addressed store, hash-verified

32 * @version 2.0-pre
33 */
34public final class PrintSetupRecord extends StandardRecord {
35 public final static short sid = 0x00A1;
36 /** Constants for this are held in {@link PrintSetup} */
37 private short field_1_paper_size;
38 private short field_2_scale;
39 private short field_3_page_start;
40 private short field_4_fit_width;
41 private short field_5_fit_height;
42 private short field_6_options;
43 static final private BitField lefttoright =
44 BitFieldFactory.getInstance(0x01); // print over then down
45 static final private BitField landscape =
46 BitFieldFactory.getInstance(0x02); // landscape mode
47 static final private BitField validsettings = BitFieldFactory.getInstance(
48 0x04); // if papersize, scale, resolution, copies, landscape
49
50 // weren't obtained from the print consider them
51 // mere bunk
52 static final private BitField nocolor =
53 BitFieldFactory.getInstance(0x08); // print mono/b&w, colorless
54 static final private BitField draft =
55 BitFieldFactory.getInstance(0x10); // print draft quality
56 static final private BitField notes =
57 BitFieldFactory.getInstance(0x20); // print the notes
58 static final private BitField noOrientation =
59 BitFieldFactory.getInstance(0x40); // the orientation is not set
60 static final private BitField usepage =
61 BitFieldFactory.getInstance(0x80); // use a user set page no, instead of auto
62 private short field_7_hresolution;
63 private short field_8_vresolution;
64 private double field_9_headermargin;
65 private double field_10_footermargin;
66 private short field_11_copies;
67
68 public PrintSetupRecord()
69 {
70 }
71
72 public PrintSetupRecord(RecordInputStream in)
73 {
74 field_1_paper_size = in.readShort();
75 field_2_scale = in.readShort();
76 field_3_page_start = in.readShort();
77 field_4_fit_width = in.readShort();
78 field_5_fit_height = in.readShort();
79 field_6_options = in.readShort();
80 field_7_hresolution = in.readShort();
81 field_8_vresolution = in.readShort();
82 field_9_headermargin = in.readDouble();
83 field_10_footermargin = in.readDouble();
84 field_11_copies = in.readShort();
85 }
86
87 public void setPaperSize(short size)
88 {
89 field_1_paper_size = size;
90 }
91

Callers

nothing calls this directly

Calls 1

getInstanceMethod · 0.95

Tested by

no test coverage detected