You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Franck Thery <fr...@wanadoo.fr> on 2005/05/26 11:44:16 UTC
Page setup
I have a workbook which possesses several sheet of various size (nb
column / row different).
How I may define the same pagination of impression (printing) for all
the workbook :
- landscape : ok
- Centre horizontally the sheet.
- Adaptation on a single page width and height.
I use for create my sheet :
HSSFSheet onglet = classeur.createSheet(titre);
onglet.setFitToPage(true);
HSSFPrintSetup ps = onglet.getPrintSetup();
ps.setPaperSize(HSSFPrintSetup.A4_PAPERSIZE);
ps.setFitHeight((short) 1);
ps.setFitWidth((short) 1);
ps.setLandscape(true);
Only orientation, it's ok ?
Thanks,
Franck Thery
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
RE: Page setup
Posted by Shawn Laubach <sh...@cox.net>.
Add onglet.setAutobreaks(true);
http://jakarta.apache.org/poi/hssf/quick-guide.html#FitTo
-----Original Message-----
From: Franck Thery [mailto:franck-thery@wanadoo.fr]
Sent: Thursday, May 26, 2005 4:44 AM
To: POI Users List
Subject: Page setup
I have a workbook which possesses several sheet of various size (nb
column / row different).
How I may define the same pagination of impression (printing) for all
the workbook :
- landscape : ok
- Centre horizontally the sheet.
- Adaptation on a single page width and height.
I use for create my sheet :
HSSFSheet onglet = classeur.createSheet(titre);
onglet.setFitToPage(true);
HSSFPrintSetup ps = onglet.getPrintSetup();
ps.setPaperSize(HSSFPrintSetup.A4_PAPERSIZE);
ps.setFitHeight((short) 1);
ps.setFitWidth((short) 1);
ps.setLandscape(true);
Only orientation, it's ok ?
Thanks,
Franck Thery
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/