Return-Path: Delivered-To: apmail-jakarta-poi-dev-archive@www.apache.org Received: (qmail 11696 invoked from network); 23 Oct 2003 16:29:34 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 23 Oct 2003 16:29:34 -0000 Received: (qmail 51665 invoked by uid 500); 23 Oct 2003 16:29:03 -0000 Delivered-To: apmail-jakarta-poi-dev-archive@jakarta.apache.org Received: (qmail 51621 invoked by uid 500); 23 Oct 2003 16:29:02 -0000 Mailing-List: contact poi-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "POI Developers List" Reply-To: "POI Developers List" Delivered-To: mailing list poi-dev@jakarta.apache.org Received: (qmail 51594 invoked from network); 23 Oct 2003 16:29:02 -0000 Received: from unknown (HELO exchange.sun.com) (192.18.33.10) by daedalus.apache.org with SMTP; 23 Oct 2003 16:29:02 -0000 Received: (qmail 12852 invoked by uid 50); 23 Oct 2003 16:32:13 -0000 Date: 23 Oct 2003 16:32:13 -0000 Message-ID: <20031023163213.12851.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: poi-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 24066] New: - "Fit To" option in the Page Setup Properties not working X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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