Whenever I run my program the resulted document will always have unreadable content. tried to find the root of the issue and it will always happen whenever I try to modify a table.
my current table edit code:
- Code: Select all
- Tr workingRow = (Tr) XmlUtils.deepCopy(templateRow);
 List<?> textElements = getTargetElements(workingRow, Text.class);
 for (Object object : textElements) {
 Text text = (Text) object;
 textBefore = text.getValue();
 String replacementValue = (String) replacements.get(textBefore);
 if (replacementValue != null) {
 text.setValue(replacementValue);
 }
 }
 reviewtable.getContent().add(workingRow);
replacementValue has texts that needs to be replace since I can't use VariableReplace as it is a dynamic table.
libraries used: docx4j 8.3.1 and docx4j-JAXB-MOXy 8.3.1


 News
 News Site map
 Site map SitemapIndex
 SitemapIndex RSS Feed
 RSS Feed