Hi,
i'm pretty new to POI and i'm trying to get the number of pages per pagesize
out of a document.
My test document has 2 A4 pages and one A3 page.
Out of the SummaryInformation of the WordExtractor i get a pagecount of 3
which is correct.
When i loop the sections of the document i can read the pagesize in 1/20
point:
HWPFDocument doc = new HWPFDocument(fs);
SectionTable st = doc.getSectionTable();
ArrayList secs = st.getSections();
Object[] elements = secs.toArray();
for(int i=0; i < elements.length ; i++){
SEPX sec = (SEPX) elements[i];
SectionProperties sp = sec.getSectionProperties();
System.out.println( "getXaPage " + ":" + sp.getXaPage());
System.out.println( "getYaPage " + ":" + sp.getYaPage());
}
I get 2 sections. One A4 and one A3 which is correct:
getXaPage :11906
getYaPage :16838
getXaPage :16840
getYaPage :23814
But i dont know how many pages section 1 or 2 is. I looked for a long time,
but i didn't find it.
Can someone please help me out with this?
--
View this message in context:
http://apache-poi.1045710.n5.nabble.com/how-to-get-pageCount-per-pageSize-tp4910389p4910389.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]