Hi,
I am using Aspose.Words java with a trial license. I am trying to process a 13 page DOCX file to extract hyperlinks from it. But the program stops at the end of page 6. No exceptions.
Is there a restriction with trial license that it would process only 6 pages? Source code below.
// Open the document.
Document doc = …;
// Hyperlinks in a Word documents are fields, select all field start nodes so we can find the hyperlinks.
NodeList fieldStarts = doc.selectNodes("//FieldStart");
String linkName; String linkURL;
for (FieldStart fieldStart : (Iterable) fieldStarts)
{
if (fieldStart.getFieldType() == FieldType.FIELD_HYPERLINK)
{
// The field is a hyperlink field, use the “facade” class to help to deal with the field.
Hyperlink hyperlink = new Hyperlink(fieldStart);
linkName = hyperlink.getName();
linkURL= hyperlink.getTarget();
// Some hyperlinks can be local (links to bookmarks inside the document), ignore these.
if (hyperlink.isLocal() || linkURL.startsWith(“mailto:”))
System.out.println(“Internal : " + linkName + " \n\t” + linkURL);
else
System.out.println(“External : " + linkName + " \n\t” + linkURL);
}
}