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
- Code: Select all
+ "<a:cs typeface=\"Times New Roman\"/>"
+"<a:hlinkClick r:id=\"rId8\" action=\"ppaction://hlinksldjump\"/>"
+ "</a:rPr>
The code compiles fine. But when I open the files - says that it is corrupt and the slide is replaced with a blank one.
I am missing something. Not sure what it is.
Thanks
Johnson