Hi there. I've been trying to make the following code work for two days now, but I'm getting nowhere. It runs, but when I open the resulting pptx it says the target slide is corrupted - what am I missing/doing wrong?
// BinaryPart
BinaryPart binaryPart = new BinaryPart(new PartName("/ppt/media/imagereport.png"));
binaryPart.setBinaryData(bytes);
binaryPart.setContentType(new org.docx4j.openpackaging.contenttype.ContentType(ContentTypes.IMAGE_PNG));
binaryPart.setRelationshipType(Namespaces.IMAGE);
//Relationship bpRelationship = slidePart.addTargetPart(binaryPart);
Pic pic = new Pic();
// nvPicPr
pic.setNvPicPr(new Pic.NvPicPr());
pic.getNvPicPr().setCNvPr(new CTNonVisualDrawingProps());
pic.getNvPicPr().setCNvPicPr(new CTNonVisualPictureProperties());
pic.getNvPicPr().getCNvPicPr().setPicLocks(new CTPictureLocking());
pic.getNvPicPr().setNvPr(new NvPr());
pic.getNvPicPr().getCNvPr().setId(983894378910L); ...

News of Plutext