Hi Jason,
Is docx4j going to support Diagram (SmartArt) in the near future? Currently all diagram related parts are instantiated as BinaryPart and it's hard to manipulate it.
Many thanks,
Rocky
It is currently Tue Jun 17, 2025 9:56 pm
org.docx4j.wml.PPr ppr = ((org.docx4j.wml.P)o).getPPr(); // get paragraph propertires
PPrBase.NumPr numPr = ppr.getNumPr();
if( numPr != null) { // This paragraph is numbered
System.out.println("This paragraph has numbering level: " + numPr.getIlvl().getVal());
}
<w:p>
<w:pPr>
<w:listPr><w:ilvl w:val="0"/><!--skip-->
</w:listPr>
</w:pPr>
<w:r><w:t>Bulleted item 1</w:t></w:r>
</w:p>
Exception in thread "AWT-EventQueue-1" java.lang.StackOverflowError
at java.util.HashMap.get(Unknown Source)
at org.docx4j.model.PropertyResolver.fillPPrStack(PropertyResolver.java:1068)
private P.Hyperlink createHyperlink(String target, String text)
{
//... creating Relationship with addRelationship() ...
P.Hyperlink hyperlink = this.objectFactory.createPHyperlink();
hyperlink.setId(relationship.getId());
R run = this.objectFactory.createR();
RPr runProperties = this.objectFactory.createRPr();
RStyle styleValue = this.objectFactory.createRStyle();
styleValue.setVal("Hyperlink");
runProperties.setRStyle(styleValue);
run.setRPr(runProperties);
Text xmlText = this.objectFactory.createText();
xmlText.setValue(text);
run.getRunContent().add(xmlText);
hyperlink.getParagraphContent().add(run);
return hyperlink;
}
Total posts 10181 • Total topics 2864 • Total members 2095