Hello,

recently I had similar issue. As a workaround at the moment I'm creating
document not from the scratch but from blank document with landscape layout.

XPath inside document.xml is /document/body/sectPr/pgSz. Inside XWPFDocument
class this can be change with following call:
ctDocument.getBody().getSectPr().getPgSz().setOrient(STPageOrientation.LANDSCAPE);

I think of sending patch to community

--
 Best Regards,
 Dmitry Kochelaev


On Thu, Apr 28, 2011 at 4:07 PM, jpoi <[email protected]> wrote:

>
> Hello, how can I set the format of a word document (XWPFDocument) to
> landscape format?
> I've only found the printsetup() method for XSSF Excel Sheets, but nothing
> for word documents.
>
> Thanks, jpoi
>
> --
> View this message in context:
> http://apache-poi.1045710.n5.nabble.com/Landscape-format-for-a-word-document-XWPFDocument-tp4346297p4346297.html
> Sent from the POI - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to