public class PdfExplicitDestination extends PdfDestination
PdfExplicitRemoteGoToDestination
class instead. Note that despite methods with integer value for page parameter are deprecated in this class, Adobe Acrobat handles such destinations correctly, but removes them completely from a PDF, when it is saved as an optimized pdf with the "discard-invalid-links" option. Therefore it is strongly recommended to use methods accepting pdfPage instance, if the destination is inside of the current document.
Constructor and Description |
---|
PdfExplicitDestination() |
PdfExplicitDestination(PdfArray pdfObject) |
Modifier and Type | Method and Description |
---|---|
static PdfExplicitDestination |
create(PdfPage page, PdfName type, float left, float bottom, float right, float top, float zoom)
Creates a PdfExplicitDestination associated with an object inside current PDF document.
|
static PdfExplicitDestination |
createFit(PdfPage page)
Creates PdfExplicitDestination .
|
static PdfExplicitDestination |
createFitB(PdfPage page)
Creates PdfExplicitDestination .
|
static PdfExplicitDestination |
createFitBH(PdfPage page, float top)
Creates PdfExplicitDestination .
|
static PdfExplicitDestination |
createFitBV(PdfPage page, float left)
Creates PdfExplicitDestination .
|
static PdfExplicitDestination |
createFitH(PdfPage page, float top)
Creates PdfExplicitDestination .
|
static PdfExplicitDestination |
createFitR(PdfPage page, float left, float bottom, float right, float top)
Creates PdfExplicitDestination .
|
static PdfExplicitDestination |
createFitV(PdfPage page, float left)
Creates PdfExplicitDestination .
|
static PdfExplicitDestination |
createXYZ(PdfPage page, float left, float top, float zoom)
Creates PdfExplicitDestination .
|
PdfObject |
getDestinationPage(Map<String,PdfObject> names) |
protected boolean |
isWrappedObjectMustBeIndirect()
Defines if the object behind this wrapper must be an indirect object in the resultant document.
|
makeDestination
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, flush, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
public PdfExplicitDestination()
public PdfExplicitDestination(PdfArray pdfObject)
public PdfObject getDestinationPage(Map<String,PdfObject> names)
getDestinationPage
in class PdfDestination
public static PdfExplicitDestination createXYZ(PdfPage page, float left, float top, float zoom)
PdfExplicitDestination
. The designated page will be displayed with its contents magnified by the factor zoom and positioned at the upper-left corner of the window.
page
- the destination page
left
- the X coordinate of the left edge of the destination rectangle
top
- the Y coordinate of the upper edge of the destination rectangle
zoom
- zoom factor
PdfExplicitDestination
public static PdfExplicitDestination createFit(PdfPage page)
PdfExplicitDestination
. The designated page will be displayed with its contents magnified just enough to fit the entire page within the window both horizontally and vertically.
page
- the destination page
PdfExplicitDestination
public static PdfExplicitDestination createFitH(PdfPage page, float top)
PdfExplicitDestination
. The designated page will be displayed with its contents magnified just enough to fit the entire width of the page within the window.
page
- the destination page
top
- the Y coordinate of the upper edge of the destination rectangle
PdfExplicitDestination
public static PdfExplicitDestination createFitV(PdfPage page, float left)
PdfExplicitDestination
. The designated page will be displayed with its contents magnified just enough to fit the entire height of the page within the window.
page
- the destination page
left
- the X coordinate of the left edge of the destination rectangle
PdfExplicitDestination
public static PdfExplicitDestination createFitR(PdfPage page, float left, float bottom, float right, float top)
PdfExplicitDestination
. The designated page will be displayed with its contents magnified just enough to fit the rectangle specified by the coordinates left, bottom, right, and top entirely within the window both horizontally and vertically.
page
- the destination page
left
- the X coordinate of the left edge of the destination rectangle
bottom
- the Y coordinate of the lower edge of the destination rectangle
right
- the X coordinate of the right edge of the destination rectangle
top
- the Y coordinate of the upper edge of the destination rectangle
PdfExplicitDestination
public static PdfExplicitDestination createFitB(PdfPage page)
PdfExplicitDestination
. The designated page will be displayed with its contents magnified just enough to fit its bounding box entirely within the window both horizontally and vertically.
page
- the destination page
PdfExplicitDestination
public static PdfExplicitDestination createFitBH(PdfPage page, float top)
PdfExplicitDestination
. The designated page will be displayed with its contents magnified just enough to fit the entire width of its bounding box within the window.
page
- the destination page
top
- the Y coordinate of the upper edge of the destination rectangle
PdfExplicitDestination
public static PdfExplicitDestination createFitBV(PdfPage page, float left)
PdfExplicitDestination
. The designated page will be displayed with its contents magnified just enough to fit the entire height of its bounding box within the window.
page
- the destination page
left
- the X coordinate of the left edge of the destination rectangle
PdfExplicitDestination
public static PdfExplicitDestination create(PdfPage page, PdfName type, float left, float bottom, float right, float top, float zoom)
PdfExplicitDestination
associated with an object inside current PDF document.
page
- the destination page
type
- a PdfName
specifying one of the possible ways to define the area to be displayed. See ISO 32000-1, section 12.3.2.2 "Explicit Destinations", Table 151 – Destination syntax
left
- the X coordinate of the left edge of the destination rectangle
bottom
- the Y coordinate of the lower edge of the destination rectangle
right
- the X coordinate of the right edge of the destination rectangle
top
- the Y coordinate of the upper edge of the destination rectangle
zoom
- zoom factor
PdfExplicitDestination
protected boolean isWrappedObjectMustBeIndirect()
PdfObjectWrapper
isWrappedObjectMustBeIndirect
in class PdfObjectWrapper<PdfObject>
Copyright © 1998–2022 iText Group NV. All rights reserved.