It is currently Tue Nov 26, 2024 12:21 am
String bookmarkStart =
"<w:bookmarkStart w:id=\"0\" w:name=\"sampleBookmark\" />",
bookmarkEnd = "<w:bookmarkEnd w:id=\"0\" />";
Object bStart = XmlUtils.unmarshalString(bookmarkStart);
Object bEnd = XmlUtils.unmarshalString(bookmarkEnd);
The prefix "w" for element "w:bookmarkStart" is not bound.
List<DefaultElement> elementList = documentSettings.getDocument().getRootElement().elements();
for(DefaultElement e:elementList){
if(e.getName().equals("documentProtection")) {
List<DefaultAttribute> attributeList = e.attributes();
for(DefaultAttribute a:attributeList) {
if(a.getName().equals("edit")) {
if(a.getValue().equals("comments")) protectType = STDocProtect.COMMENTS;
if(a.getValue().equals("forms")) protectType = STDocProtect.FORMS;
if(a.getValue().equals("none")) protectType = STDocProtect.NONE;
if(a.getValue().equals("readOnly")) protectType = STDocProtect.READ_ONLY;
if(a.getValue().equals("trackedChanges")) protectType = STDocProtect.TRACKED_CHANGES;
}
}
}
}
<p:nvGraphicFramePr>
<p:cNvPr id="4" name="Chart 3"/>
<p:cNvGraphicFramePr/>
<p:nvPr>
<p:extLst>
<p:ext uri="{D42A27DB-BD31-4B8C-83A1-F6EECF244321}">
<p14:modId xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main" val="1842877689"/>
</p:ext>
</p:extLst>
</p:nvPr>
</p:nvGraphicFramePr>
BindingHandler.applyBindings(wordMLPackage.getMainDocumentPart());
BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(_package, bytes);
Inline inline = imagePart.createImageInline(null, null, id1, id2, false);
// Now wrap the inline in w:p/w:r/w:drawing
P p = _objFactory.createP();
R run = _objFactory.createR();
p.getParagraphContent().add(run);
org.docx4j.wml.Drawing drawing = _objFactory.createDrawing();
run.getRunContent().add(drawing);
drawing.getAnchorOrInline().add(inline);
_documentPart.addObject(p);
Total posts 10111 • Total topics 2842 • Total members 2074