Raghv,

Word document doesn't store text pagination, i.e. it is not possible
to count pages or find out what text placed on which page.

Unless you are ready to emulate Word and render all text on pages by
yourself (like using WordToFoConverter and Apache FOP).

Best regards,
Sergey

On Mon, Jan 16, 2012 at 1:14 PM, Raghvender Sundarjee
<[email protected]> wrote:
> Hi,
> In Microsoft word 2003 document, below is the code which counts the number of 
> pages in the document.
>
> HWPFDocument wordDoc = new HWPFDocument(fi);
>  int noPages = wordDoc.getSummaryInformation().getPageCount();
>
> The count is not always correct and for some of the documents due to 
> "Pagination", it gives the wrong or incorrect result.
>
> Please let me know is it possible to address "Pagination" issue in POI or is 
> there any other means to count exact page numbers of a word document???
>
> Thank You,
> Raghv
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Sergey Vladimirov

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to