Class PDFNet.Destination
PDFNet.Destination
Constructor Attributes | Constructor Name and Description |
---|---|
A destination defines a particular view of a document, consisting of the
following:
- The page of the document to be displayed
- The location of the document window on that page
- The magnification (zoom) factor to use when displaying the page
Destinations may be associated with Bookmarks, Annotations, and Remote Go-To Actions.
|
Method Attributes | Method Name and Description |
---|---|
copy()
Assignment operator
|
|
<static> |
PDFNet.Destination.create(dest)
Create a Destination and initialize it using given Cos/SDF object.
|
<static> |
PDFNet.Destination.createFit(page)
Create a new 'Fit' Destination.
|
<static> |
PDFNet.Destination.createFitB(page)
Create a new 'FitB' Destination.
|
<static> |
PDFNet.Destination.createFitBH(page, top)
Create a new 'FitBH' Destination.
|
<static> |
PDFNet.Destination.createFitBV(page, left)
Create a new 'FitBV' Destination.
|
<static> |
PDFNet.Destination.createFitH(page, top)
Create a new 'FitH' Destination.
|
<static> |
PDFNet.Destination.createFitR(page, left, bottom, right, top)
Create a new 'FitR' Destination.
|
<static> |
PDFNet.Destination.createFitV(page, left)
Create a new 'FitV' Destination.
|
<static> |
PDFNet.Destination.createXYZ(page, left, top, zoom)
Create a new 'XYZ' Destination.
|
getPage()
|
|
isValid()
|
|
setPage(page)
Modify the destination so that it refers to the new 'page' as the destination page.
|
Class Detail
PDFNet.Destination(id)
A destination defines a particular view of a document, consisting of the
following:
- The page of the document to be displayed
- The location of the document window on that page
- The magnification (zoom) factor to use when displaying the page
Destinations may be associated with Bookmarks, Annotations, and Remote Go-To Actions.
Destination is a utility class used to simplify work with PDF Destinations;
Please refer to section 8.2.1 'Destinations' in PDF Reference Manual for details.
- Parameters:
- id
Method Detail
{Destination}
copy()
Assignment operator
- Returns:
- {Destination} A promise that resolves to an object of type: "Destination" (generated documentation)
<static>
{Destination}
PDFNet.Destination.create(dest)
Create a Destination and initialize it using given Cos/SDF object.
- Parameters:
- {Obj} dest
- a low-level (SDF/Cos) destination object. The low-level destination can be either a named destination (i.e. a Name or a String) or an explicit destination (i.e. an Array Obj). Please refer to section 8.2.1 'Destinations' in PDF Reference Manual for more details.
- Returns:
- {Destination} A promise that resolves to an object of type: "Destination" (generated documentation)
<static>
{Destination}
PDFNet.Destination.createFit(page)
Create a new 'Fit' Destination.
The new Destination displays the page designated by 'page', with its contents
magnified just enough to fit the entire page within the window both
horizontally and vertically. If the required horizontal and vertical
magnification factors are different, use the smaller of the two, centering
the page within the window in the other dimension.
- Parameters:
- {Page} page
- Page object to display
- Returns:
- {Destination} A promise that resolves to an object of type: "Destination" (generated documentation)
<static>
{Destination}
PDFNet.Destination.createFitB(page)
Create a new 'FitB' Destination.
The new Destination displays the page designated by 'page', with its
contents magnified just enough to fit its bounding box entirely within
the window both horizontally and vertically. If the required
horizontal and vertical magnification factors are different, use the
smaller of the two, centering the bounding box within the window in
the other dimension.
- Parameters:
- {Page} page
- Page object to display
- Returns:
- {Destination} A promise that resolves to an object of type: "Destination" (generated documentation)
<static>
{Destination}
PDFNet.Destination.createFitBH(page, top)
Create a new 'FitBH' Destination.
The new Destination displays the page designated by 'page', with
the vertical coordinate 'top' positioned at the top edge of the window
and the contents of the page magnified just enough to fit the entire
width of its bounding box within the window.
- Parameters:
- {Page} page
- Page object to display
- {number} top
- vertical coordinate of the top edge of the window
- Returns:
- {Destination} A promise that resolves to an object of type: "Destination" (generated documentation)
<static>
{Destination}
PDFNet.Destination.createFitBV(page, left)
Create a new 'FitBV' Destination.
The new Destination displays Display the page designated by 'page',
with the horizontal coordinate 'left' positioned at the left edge of
the window and the contents of the page magnified just enough to fit
the entire height of its bounding box within the window.
- Parameters:
- {Page} page
- Page object to display
- {number} left
- horizontal coordinate of the left edge of the window
- Returns:
- {Destination} A promise that resolves to an object of type: "Destination" (generated documentation)
<static>
{Destination}
PDFNet.Destination.createFitH(page, top)
Create a new 'FitH' Destination.
The new Destination displays the page designated by 'page', with the
vertical coordinate 'top' positioned at the top edge of the window and
the contents of the page magnified just enough to fit the entire width
of the page within the window.
- Parameters:
- {Page} page
- Page object to display
- {number} top
- vertical coordinate of the top edge of the window
- Returns:
- {Destination} A promise that resolves to an object of type: "Destination" (generated documentation)
<static>
{Destination}
PDFNet.Destination.createFitR(page, left, bottom, right, top)
Create a new 'FitR' Destination.
The new Destination displays the page designated by 'page', 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. If the required horizontal
and vertical magnification factors are different, use the smaller of
the two, centering the rectangle within the window in the other
dimension.
- Parameters:
- {Page} page
- Page object to display
- {number} left
- horizontal coordinate of the left edge of the window
- {number} bottom
- vertical coordinate of the bottom edge of the window
- {number} right
- horizontal coordinate of the right edge of the window
- {number} top
- vertical coordinate of the top edge of the window
- Returns:
- {Destination} A promise that resolves to an object of type: "Destination" (generated documentation)
<static>
{Destination}
PDFNet.Destination.createFitV(page, left)
Create a new 'FitV' Destination.
The new Destination displays the page designated by 'page', with the
horizontal coordinate 'left' positioned at the left edge of the window
and the contents of the page magnified just enough to fit the entire
height of the page within the window.
- Parameters:
- {Page} page
- Page object to display
- {number} left
- horizontal coordinate of the left edge of the window
- Returns:
- {Destination} A promise that resolves to an object of type: "Destination" (generated documentation)
<static>
{Destination}
PDFNet.Destination.createXYZ(page, left, top, zoom)
Create a new 'XYZ' Destination.
The new Destination displays the page designated by 'page', with the
coordinates ('left', 'top') positioned at the top-left corner of the
window and the contents of the page magnified by the factor 'zoom'.
A null value for any of the parameters 'left', 'top', or 'zoom' specifies
that the current value of that parameter is to be retained unchanged.
A 'zoom' value of 0 has the same meaning as a null value.
the page within the window in the other dimension.
- Parameters:
- {Page} page
- Page object to display
- {number} left
- horizontal coordinate of the left edge of the window
- {number} top
- vertical coordinate of the top edge of the window
- {number} zoom
- amount to zoom the page by
- Returns:
- {Destination} A promise that resolves to an object of type: "Destination" (generated documentation)
{Obj}
getExplicitDestObj()
- Returns:
- {Obj} A promise that resolves to the explicit destination SDF/Cos object. This is always an Array as shown in Table 8.2 in PDF Reference Manual.
{number}
getFitType()
Return value enum:PDFNet.Destination.FitType = { e_XYZ : 0 e_Fit : 1 e_FitH : 2 e_FitV : 3 e_FitR : 4 e_FitB : 5 e_FitBH : 6 e_FitBV : 7 }
- Returns:
- {number} A promise that resolves to destination's FitType.
{Page}
getPage()
- Returns:
- {Page} A promise that resolves to the Page that this destination refers to.
{Obj}
getSDFObj()
- Returns:
- {Obj} A promise that resolves to the object to the underlying SDF/Cos object. The returned SDF/Cos object is an explicit destination (i.e. the Obj is either an array defining the destination, using the syntax shown in Table 8.2 in PDF Reference Manual), or a dictionary with a 'D' entry whose value is such an array. The latter form allows additional attributes to be associated with the destination
{boolean}
isValid()
- Returns:
- {boolean} A promise that resolves to true if this is a valid Destination and can be resolved, false otherwise.
setPage(page)
Modify the destination so that it refers to the new 'page' as the destination page.
- Parameters:
- {Page} page
- The new page associated with this Destination.