Hi,
I have a problem with attached file because when I load the file and get any paragraph from it, they don’t have a spaces between the word and every Run of paragraph don’t have a space, too.
This is the code and I attached the file and you can try:
public void runTest() throws Exception {
Document document = new Document("/path/Script AYEW.docx");
NodeCollection nodeCollection = document.getChildNodes(
NodeType.PARAGRAPH, true);
Paragraph paragraph = (Paragraph) nodeCollection.get(9);
System.out.println(paragraph.getText());
RunCollection runCollection = paragraph.getRuns();
Iterator runIterator = runCollection.iterator();
while (runIterator.hasNext()) {
Run run = runIterator.next();
System.out.println(run.getText());
}
}
Can you help me about this?
Thanks,
Bojan