Hi there
I am trying Split document by page and save each page into images jpg y already read in the forums some examples for resolve the same problem i download the library pagesplitter.zip posted in the forum and the next code i found it here Split Word’s pages into separate documents using Java
Document doc = new Document("C:\Temp\in.doc");
LayoutCollector layoutCollector = new LayoutCollector(doc);
doc.updatePageLayout();
DocumentPageSplitter splitter = new DocumentPageSplitter(layoutCollector);
Document pageDoc = splitter.GetDocumentOfPage(5);
pageDoc.save("C:\Temp\out.doc");
The code run perfectly but it didn´t run well if i specific a page of document splitter Document pageDoc = splitter.GetDocumentOfPage(5); only takes de first page of the document always even if i chage GetDocumentOfPage to 1 or 2… etc
My doubts are :
- how can i know how many pages have the document?
- how i can specify the number of page in the document that I want convert?
Thanks in advance for your help!