HyperlinkCollector

Inheritance: java.lang.Object

public class HyperlinkCollector

The class provides collecting hyperlinked XPS elements from the current page of an XPS document.

Methods

MethodDescription
collectHyperlinks(XpsDocument document)Collects XPS elements with hyperlinks of all types.
collectHyperlinks(XpsDocument document, Class cls)Collects XPS elements with hyperlinks of a certain type.
public static Collection<XpsHyperlinkElement> collectHyperlinks(XpsDocument document)

Collects XPS elements with hyperlinks of all types.

Parameters:

ParameterTypeDescription
documentXpsDocumentThe XPS document.

Returns: java.util.Collection<com.aspose.xps.XpsHyperlinkElement> - The collection containing hyperlinked XPS elements.

public static Collection<XpsHyperlinkElement> <T>collectHyperlinks(XpsDocument document, Class<T> cls)

Collects XPS elements with hyperlinks of a certain type.

Parameters:

ParameterTypeDescription
documentXpsDocumentThe XPS document.
clsjava.lang.ClassThe class object corresponding to the hyperlink target type to filter out.

Returns: java.util.Collection<com.aspose.xps.XpsHyperlinkElement> - The collection containing hyperlinked XPS elements.