Hallo Nick,

I add a new SectPr(), and I can set the STPageOrientation to landscape. And I 
also can read the page orientation from the document --> it is set to 
landscape, but the document is still in portrait format, when I open it. Why is 
the parameter set landscape, when I still get a portrait format document?

Best regards,
jpoi

Von: Nick Burch-11 [via Apache POI] 
[mailto:[email protected]]
Gesendet: Freitag, 6. Mai 2011 02:54
An: Armisen, Gülcin
Betreff: Re: Landscape format for a word document - XWPFDocument

On Thu, 5 May 2011, jpoi wrote:
> thank you for your reply. I have tried to use this method:
>
> ctDocument.getBody().getSectPr().getPgSz().setOrient(STPageOrientation.LANDSCAPE);
>
> but for the CTSectPr object I get a NullpointerException. I couldn't find
> the reason for this.

Your document might not have a SectPr yet. isSetSectPr() will let you
check if there is one, and addNewSectPr() will add one if there isn't

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden 
email]</user/SendEmail.jtp?type=node&node=4374668&i=0&by-user=t>
For additional commands, e-mail: [hidden 
email]</user/SendEmail.jtp?type=node&node=4374668&i=1&by-user=t>


________________________________
If you reply to this email, your message will be added to the discussion below:
http://apache-poi.1045710.n5.nabble.com/Landscape-format-for-a-word-document-XWPFDocument-tp4346297p4374668.html
To unsubscribe from Landscape format for a word document - XWPFDocument, click 
here<http://apache-poi.1045710.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4346297&code=Z3VlbGNpbi5hcm1pc2VuQGh1ay1jb2J1cmcuZGV8NDM0NjI5N3wxMzE0MjE3OTE2>.



Gülcin Armisen
Abteilung Informatik

HUK-COBURG
Bahnhofsplatz
96444 Coburg
Telefon:  09561 96-1928
Telefax:  09561 96-3671
E-Mail:   [email protected]
Internet:  www.huk.de

________________________________
HUK-COBURG Haftpflicht-Unterstützungs-Kasse kraftfahrender Beamter Deutschlands 
a. G. in Coburg
Reg.-Gericht Coburg HRB 100; St.-Nr. 9212/101/00021
Sitz der Gesellschaft: Bahnhofsplatz, 96444 Coburg
Vorsitzender des Aufsichtsrats: Werner Strohmayr.
Vorstand: Dr. Wolfgang Weiler (Sprecher), Wolfgang Flaßhoff, Stefan Gronbach, 
Klaus-Jürgen Heitmann, Dr. Hans Olav Herøy, Jörn Sandig.
________________________________
Diese Nachricht enthält vertrauliche und/oder rechtlich geschützte 
Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese Nachricht irrtümlich 
erhalten haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese Nachricht.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Nachricht ist 
nicht gestattet.

This information may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this information in 
error) please notify the
sender immediately and destroy this information.
Any unauthorized copying, disclosure or distribution of the material in this 
information is strictly forbidden.
________________________________




--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/Landscape-format-for-a-word-document-XWPFDocument-tp4346297p4399852.html
Sent from the POI - User mailing list archive at Nabble.com.

Reply via email to