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 EmbeddedPdfLink
create(Document targetDocument, Rectangle boundingBox, FileReference fileReference)
Create a link to an embedded PDF documentstatic EmbeddedPdfLink
createFromQuadrilaterals(Document targetDocument, QuadrilateralList activeArea, FileReference fileReference)
Create a link to an embedded PDF document with defined link areajava.lang.Boolean
getNewWindow()
The opening behavior (Getter)void
setNewWindow(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 thetargetDocument
but 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 thetargetDocument
has already been closedjava.lang.IllegalArgumentException
- if thetargetDocument
is read-onlyjava.lang.IllegalArgumentException
- if the document associated with thefileReference
argument has already been closedjava.lang.IllegalArgumentException
- if thefileReference
argument does not contain a PDF documentjava.lang.IllegalArgumentException
- if thefileReference
argument 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 thefileReference
argument is used in a file attachment annotation and this annotation has not been appended to a page's list of annotations.java.lang.IllegalArgumentException
- iftargetDocument
isnull
java.lang.IllegalArgumentException
- ifboundingBox
isnull
java.lang.IllegalArgumentException
- iffileReference
isnull
-
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 thetargetDocument
but 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 thetargetDocument
has already been closedjava.lang.IllegalArgumentException
- if thetargetDocument
is read-onlyjava.lang.IllegalArgumentException
- if the document associated with thefileReference
argument has already been closedjava.lang.IllegalArgumentException
- if thefileReference
argument does not contain a PDF documentjava.lang.IllegalArgumentException
- if thefileReference
argument 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 thefileReference
argument 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 theactiveArea
is emptyjava.lang.IllegalArgumentException
- iftargetDocument
isnull
java.lang.IllegalArgumentException
- ifactiveArea
isnull
java.lang.IllegalArgumentException
- iffileReference
isnull
-
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
-
-
-