Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HSSFPrintSetup"/> class.
 /// </summary>
 /// <param name="printSetupRecord">Takes the low level print Setup record.</param>
 public HSSFPrintSetup(PrintSetupRecord printSetupRecord)
 {
     this.printSetupRecord = printSetupRecord;
 }
Example #2
0
 private PrintSetupRecord CreatePrintSetupRecord()
 {
     PrintSetupRecord r = new PrintSetupRecord();
     r.PaperSize = ((short)0);
     r.Scale = ((short)18);
     r.PageStart = ((short)1);
     r.FitWidth = ((short)1);
     r.FitHeight = ((short)1);
     r.LeftToRight = (false);
     r.Landscape = (false);
     r.ValidSettings = (true);
     r.NoColor = (false);
     r.Draft = (false);
     r.Notes = (false);
     r.NoOrientation = (false);
     r.UsePage = (false);
     r.HResolution = ((short)0);
     r.VResolution = ((short)0);
     r.HeaderMargin = (0.5);
     r.FooterMargin = (0.5);
     r.Copies = ((short)15); // what the ??
     return r;
 }
Example #3
0
 public override Object Clone()
 {
     PrintSetupRecord rec = new PrintSetupRecord();
     rec.field_1_paper_size = field_1_paper_size;
     rec.field_2_scale = field_2_scale;
     rec.field_3_page_start = field_3_page_start;
     rec.field_4_fit_width = field_4_fit_width;
     rec.field_5_fit_height = field_5_fit_height;
     rec.field_6_options = field_6_options;
     rec.field_7_hresolution = field_7_hresolution;
     rec.field_8_vresolution = field_8_vresolution;
     rec.field_9_headermargin = field_9_headermargin;
     rec.field_10_footermargin = field_10_footermargin;
     rec.field_11_copies = field_11_copies;
     return rec;
 }
Example #4
0
        /**
         * Creates the PrintSetup Record and Sets it to defaults and marks it invalid
         * @see org.apache.poi.hssf.record.PrintSetupRecord
         * @see org.apache.poi.hssf.record.Record
         * @return record containing a PrintSetupRecord
         */

        protected Record CreatePrintSetup()
        {
            PrintSetupRecord retval = new PrintSetupRecord();

            retval.PaperSize = ((short)1);
            retval.Scale = ((short)100);
            retval.PageStart = ((short)1);
            retval.FitWidth = ((short)1);
            retval.FitHeight = ((short)1);
            retval.Options = ((short)2);
            retval.HResolution = ((short)300);
            retval.VResolution = ((short)300);
            retval.HeaderMargin = (0.5);
            retval.FooterMargin = (0.5);
            retval.Copies = ((short)0);
            return retval;
        }