It is currently Tue Nov 26, 2024 12:33 pm
public void replaceTitle(String headerString) throws JAXBException{
String xpath = "//w:r[w:t[contains(text(),'#Dokumentname')]]";
List<Object> list = mainDocumentPart.getJAXBNodesViaXPath(xpath, true);
for (Object obj : list) {
List<Object> objContent=((R)obj).getContent();
objContent.clear();
WordParagraph p = new WordParagraph(headerString);
objContent.add(p.getP());
}
}
String xpath = "//w:r[w:t[contains(text(),'audith')]]";
List<Object> list = documentPart.getJAXBNodesViaXPath(xpath, true);
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();
MainDocumentPart mdp = wordMLPackage.getMainDocumentPart();
mdp.addStyledParagraphOfText("NormalIndent", "The following PHP error occurs: "); // here i want preserve the whitespace with setSpace("preserve"), but how?
Total posts 10111 • Total topics 2842 • Total members 2074