Any one knows how to hyperlink text to a slide while creating the pptx. First I have the text and the slide is added later in the application.
Attached is the complete code that creates the text in a table and the slides.
I tried to create the Relationship
- Code: Select all
if(i == 5){
org.docx4j.relationships.ObjectFactory factory = new org.docx4j.relationships.ObjectFactory();
org.docx4j.relationships.Relationship rel = factory.createRelationship();
rel.setType("Namespaces.PRESENTATIONML_SLIDE");
rel.setTarget("/ppt/slides/slide"+i+".xml");
mainPresentationPart.getRelationshipsPart().addRelationship(rel);
System.out.println(rel.getId());
}
and added code to link the text ...