FitToPage not working in Print Preview

Dec 8, 2010 at 6:31 PM
Edited Dec 9, 2010 at 4:08 PM

I know it should have been fixed in 

http://npoi.codeplex.com/SourceControl/changeset/changes/49152

 

The radio button in the page setup -> page tab is not changing from the Scaling -> Adjust to: 100% normal size  to fit to 1 page wide by "" tall.

Any Ideas?

 

 

            Workbook hssfworkbook = new HSSFWorkbook();
            Sheet sheet1 = hssfworkbook.CreateSheet("Physical Inventory - "+ _readableName);

            //Header and Footer
            sheet1.Header.Center = "Physical Inventory - " + _readableName;
            sheet1.Footer.Right = HSSFFooter.Page;

            //Print Settings
            sheet1.PrintSetup.Copies = 1;
            sheet1.PrintSetup.NoColor = true;
            sheet1.PrintSetup.Landscape = true;
            sheet1.PrintSetup.PaperSize = (short)PaperSizeType.A4;

            sheet1.FitToPage = true;
            sheet1.PrintSetup.FitHeight = 0;
            sheet1.PrintSetup.FitWidth = 1;
            sheet1.IsPrintGridlines = true;



            //Styles
            CellStyle style = hssfworkbook.CreateCellStyle();
            style.FillForegroundColor = NPOI.HSSF.Util.HSSFColor.GREY_40_PERCENT.index;
            style.FillPattern = FillPatternType.SOLID_FOREGROUND;
            style.FillBackgroundColor = NPOI.HSSF.Util.HSSFColor.GREY_40_PERCENT.index;
            style.Alignment = HorizontalAlignment.CENTER;

 


 

Coordinator
Jan 1, 2011 at 6:21 AM

You are right. This WSBoolRecord is not merged correctly in AllinOne release. This fix will be released in NPOI 1.2.4

Jan 11, 2011 at 7:03 PM

Hi by when the next release of NPOI is planned..