poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 24066] New: - "Fit To" option in the Page Setup Properties not working
Date Thu, 23 Oct 2003 16:32:13 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24066>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24066

"Fit To" option in the Page Setup Properties not working

           Summary: "Fit To" option in the Page Setup Properties not working
           Product: POI
           Version: 2.0-pre3
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: HSSF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: mjmoore@strong.com


I am using the HSSFSheet class as well as the HSSFPrintSetup class to set some 
page setup properties for printing.  The properties I am trying to set are in 
the scaling section of the page setup form.  The second option button of the 
scaling section is the "Fit to" option button.  According to the java doc, I 
should be able to select that option button and set the width of pages to fit 
to and height of pages to fit to using the HSSFPrintSetup class's methods of 
setFitWidth and setFitHeight.  

For example:

        this.sheet.getPrintSetup().setFitWidth((short) 1);
        this.sheet.getPrintSetup().setFitHeight((short) 26);

sets the values in the Width and Height properties of the scaling section, but 
it does not select the "Fit To" option button, which is required to use these 
values.  

Upon further investigation, I found that he setScale method of the 
HSSFPrintSetup class selects the "Fit To" option button when used alone, but 
when used in conjuction with the setHeight and setWidth methods, selects 
the "Adjust To" option button in the scaling section.

For Example:
 this.sheet.getPrintSetup().setScale((short) 1);
 -Sets the "Fit To" option button and sets the width and height values to 1.
  this.sheet.getPrintSetup().setScale((short) 1);
  this.sheet.getPrintSetup().setFitWidth((short) 1);
  this.sheet.getPrintSetup().setFitHeight((short) 26);
 -Selects the "Adjust To" option button and sets the value to 1, but sets the 
width and height values of the "Fit to" option to the correct values of 1 and 
26.  

How can I set the values of the "Fit to" option button as well as set the 
values to what I need?

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org


Mime
View raw message