Hi,
In docx document we have a option of resize shape to fit text. what will be the implementation of this for textframe in docx4j?
Regards,
Pankaj G
It is currently Thu Nov 28, 2024 9:26 am
RelationshipsPart rp = wordMLPackage.getMainDocumentPart().getRelationshipsPart();
org.docx4j.relationships.Relationship hdrRelationship = rp.getRelationshipByType(Namespaces.HEADER);
HeaderPart hdrPart = (HeaderPart)rp.getPart(hdrRelationship);
HeaderPart newHdrPart = new HeaderPart();
newHdrPart.setContents(XmlUtils.deepCopy(hdrPart.getContents()));
wordMLPackage.getMainDocumentPart().addTargetPart(newHdrPart, RelationshipsPart.AddPartBehaviour.RENAME_IF_NAME_EXISTS);
content = newHdrPart.getContent();
mergeMSWordDocContentViaDocX4J(wordMLPackage, content, replacementMap);
Total posts 10111 • Total topics 2842 • Total members 2074