Hi,
I have to add internal hyperlink (a reference to a bookmark) to a document but I don't know how to do.
I try to change the HyperlinkTest Sample, removing the instruction
- Code: Select all
rel.setTargetMode("External");
But I had an exception: org.docx4j.openpackaging.exceptions.Docx4JException: Failed to add parts from relationships
I also tried to load a document which contains "internal hyperlink" with the OpenAndTraverseDocument Sample and I had the following exception:
java.lang.NullPointerException
at org.docx4j.openpackaging.io.LoadFromZipNG.getInputStreamFromZippedPart(LoadFromZipNG.java:305)
at org.docx4j.openpackaging.io.LoadFromZipNG.getRawPart(LoadFromZipNG.java:508)
at org.docx4j.openpackaging.io.LoadFromZipNG.getPart(LoadFromZipNG.java:422)
at ...