Class EmbeddedPdfLink
- java.lang.Object
-
- com.pdftools.toolbox.internal.NativeBase
-
- com.pdftools.toolbox.internal.NativeObject
-
- com.pdftools.toolbox.pdf.navigation.Link
-
- com.pdftools.toolbox.pdf.navigation.EmbeddedPdfLink
-
public class EmbeddedPdfLink extends Link
A link to an embedded PDF document
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EmbeddedPdfLinkcreate(Document targetDocument, Rectangle boundingBox, FileReference fileReference)Create a link to an embedded PDF documentstatic EmbeddedPdfLinkcreateFromQuadrilaterals(Document targetDocument, QuadrilateralList activeArea, FileReference fileReference)Create a link to an embedded PDF document with defined link areajava.lang.BooleangetNewWindow()The opening behavior (Getter)voidsetNewWindow(java.lang.Boolean value)The opening behavior (Setter)-
Methods inherited from class com.pdftools.toolbox.pdf.navigation.Link
copy, getActiveArea, getBoundingBox, getHidden, getNoPrint, setBorderStyle
-
Methods inherited from class com.pdftools.toolbox.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
create
public static EmbeddedPdfLink create(Document targetDocument, Rectangle boundingBox, FileReference fileReference)
Create a link to an embedded PDF document
The link is associated with thetargetDocumentbut not yet part of any page. It can be added to a page's list of links.- Parameters:
targetDocument- The output document with which the returned object is associatedboundingBox- The location on the pagefileReference- The embedded PDF file- Returns:
- The newly created object
- Throws:
java.lang.IllegalArgumentException- if thetargetDocumenthas already been closedjava.lang.IllegalArgumentException- if thetargetDocumentis read-onlyjava.lang.IllegalArgumentException- if the document associated with thefileReferenceargument has already been closedjava.lang.IllegalArgumentException- if thefileReferenceargument does not contain a PDF documentjava.lang.IllegalArgumentException- if thefileReferenceargument is neither used in a file attachment annotation nor has it been appended to thetargetDocument's list of plain embedded or associated files.java.lang.IllegalArgumentException- if thefileReferenceargument is used in a file attachment annotation and this annotation has not been appended to a page's list of annotations.java.lang.IllegalArgumentException- iftargetDocumentisnulljava.lang.IllegalArgumentException- ifboundingBoxisnulljava.lang.IllegalArgumentException- iffileReferenceisnull
-
createFromQuadrilaterals
public static EmbeddedPdfLink createFromQuadrilaterals(Document targetDocument, QuadrilateralList activeArea, FileReference fileReference)
Create a link to an embedded PDF document with defined link area
The link has an active area defined by the givenactiveArea. The link is associated with thetargetDocumentbut not yet part of any page. It can be added to a page's list of links.- Parameters:
targetDocument- The document in which the links is usedactiveArea- The active link area on the page.fileReference- The embedded PDF file- Returns:
- The newly created object
- Throws:
java.lang.IllegalArgumentException- if thetargetDocumenthas already been closedjava.lang.IllegalArgumentException- if thetargetDocumentis read-onlyjava.lang.IllegalArgumentException- if the document associated with thefileReferenceargument has already been closedjava.lang.IllegalArgumentException- if thefileReferenceargument does not contain a PDF documentjava.lang.IllegalArgumentException- if thefileReferenceargument is neither used in a file attachment annotation nor has it been appended to thetargetDocument's list of plain embedded or associated files.java.lang.IllegalArgumentException- if thefileReferenceargument is used in a file attachment annotation and this annotation has not been appended to a page's list of annotations.java.lang.IllegalArgumentException- if theactiveAreais emptyjava.lang.IllegalArgumentException- iftargetDocumentisnulljava.lang.IllegalArgumentException- ifactiveAreaisnulljava.lang.IllegalArgumentException- iffileReferenceisnull
-
getNewWindow
public java.lang.Boolean getNewWindow()
The opening behavior (Getter)
This defines the viewer's behavior when opening the target PDF document.-
null: The viewer uses its default behavior. -
true: Open the document in an additional window. -
false: Replace the parent document with the embedded document.
- Throws:
java.lang.IllegalStateException- if the object has already been closed
-
-
setNewWindow
public void setNewWindow(java.lang.Boolean value)
The opening behavior (Setter)
This defines the viewer's behavior when opening the target PDF document.-
null: The viewer uses its default behavior. -
true: Open the document in an additional window. -
false: Replace the parent document with the embedded document.
- Throws:
java.lang.IllegalStateException- if the object has already been closedjava.lang.UnsupportedOperationException- if the document is read-onlyjava.lang.IllegalStateException- if the annotation has already been appended to a page's list of annotations
-
-
-