Gnostice PDFOne
Pro. Ed. v1.41


com.gnostice.pdfone
Class PdfLinkAnnot

java.lang.Object
  extended bycom.gnostice.pdfone.PdfAnnot
      extended bycom.gnostice.pdfone.PdfLinkAnnot
All Implemented Interfaces:
Cloneable, Usable

public class PdfLinkAnnot
extends PdfAnnot

This class represents a link annotation. It is used to link to a destination in the same document or in another document. It can also be used to specify actions for the viewer application to perform.

The location of a link annotation is specified using a PdfRect object. However, the position and size of a PdfRect object is applied in a literal sense. As a result, the actual position of the link annotation on a page is wholly dependent on whatever measurement unit that is currently applicable. As this can cause serious shifts in position of the link annotation, care has to taken when reusing a link annotation in different places or in different situations.

Since:
1.0
Version:
1.0

Field Summary
static int FITB
          Constant for adjusting magnification (zoom) factor of a page to tightly fit entire height and width of its bounding box inside a window.
static int FITBH
          Constant for adjusting magnification (zoom) factor of a page to tightly fit entire width of its bounding box inside a window.
static int FITBV
          Constant for adjusting magnification (zoom) factor of a page to tightly fit entire height of its bounding box inside a window.
static int FITH
          Constant for adjusting magnification (zoom) factor of a page to tightly fit its entire width inside a window.
static int FITV
          Constant for adjusting magnification (zoom) factor of a page to tightly fit its entire height inside a window.
static int HIGHLIGHT_MODE_INVERT
          Highlight mode for displaying contents of annotation rectangle inverted.
static int HIGHLIGHT_MODE_NONE
          Highlight mode for displaying contents of annotation rectangle without any change from their normal appearance.
static int HIGHLIGHT_MODE_OUTLINE
          Highlight mode for displaying border of annotation rectangle inverted.
static int HIGHLIGHT_MODE_PUSH
          Highlight mode for displaying contents of annotation rectangle as if they were pushed from below the surface of the page.
 
Fields inherited from class com.gnostice.pdfone.PdfAnnot
ANNOT_TYPE_CARET, ANNOT_TYPE_CIRCLE, ANNOT_TYPE_FILE_ATTACHMENT, ANNOT_TYPE_FREE_TEXT, ANNOT_TYPE_INK, ANNOT_TYPE_LINE, ANNOT_TYPE_LINK, ANNOT_TYPE_MARKUP, ANNOT_TYPE_POLYGON, ANNOT_TYPE_POLYLINE, ANNOT_TYPE_POPUP, ANNOT_TYPE_SQUARE, ANNOT_TYPE_STAMP, ANNOT_TYPE_TEXT, ANNOT_TYPE_WATERMARK, BORDERSTYLE_BEVELED, BORDERSTYLE_DASHED, BORDERSTYLE_INSET, BORDERSTYLE_SOLID, BORDERSTYLE_UNDERLINE, FLAG_HIDDEN, FLAG_INVISIBLE, FLAG_LOCKED, FLAG_NO_ROTATE, FLAG_NO_VIEW, FLAG_NO_ZOOM, FLAG_PRINT, FLAG_READONLY, FLAG_TOGGLE_NO_VIEW
 
Fields inherited from interface com.gnostice.pdfone.Usable
INCHES_TO_POINTS, MM_TO_INCHES, MM_TO_POINTS, PDF_A, PDF_AA, PDF_AC, PDF_ACROFORM, PDF_ACTION, PDF_ALTERNATEPRESENTATIONS, PDF_ANNOT, PDF_ANNOT_DEFAULT_TITLE, PDF_ANNOT_NAME, PDF_ANNOT_SUBJECT, PDF_ANNOTS, PDF_AP, PDF_ARRAYEND, PDF_ARRAYSTART, PDF_ARTBOX, PDF_AS, PDF_ASCENT, PDF_ASCII85, PDF_ASCII85_NEW, PDF_ASCIIHEX, PDF_ASCIIHEX_NEW, PDF_AUTHOR, PDF_AVGWIDTH, PDF_B, PDF_BASEFONT, PDF_BBOX, PDF_BC, PDF_BE, PDF_BEFOREFORMAT, PDF_BEGINTEXT, PDF_BG, PDF_BINARYDATA, PDF_BITS_PER_COMPONENT, PDF_BL, PDF_BLEEDBOX, PDF_BLINDS, PDF_BMC, PDF_BORDER, PDF_BOX, PDF_BS, PDF_BTN, PDF_C, PDF_CA, PDF_CA_SMALL, PDF_CAPHEIGHT, PDF_CARETANNOT, PDF_CARRIAGE, PDF_CATALOG, PDF_CENTER_WINDOW, PDF_CH, PDF_CID_TO_GID_MAP, PDF_CIDFONT_TYPE1, PDF_CIDFONT_TYPE2, PDF_CIDSYSTEM_INFO, PDF_CIRCLEANNOT, PDF_CL, PDF_CM, PDF_COLOMNS, PDF_COLOR, PDF_COLORSPACE, PDF_CONTENTS, PDF_COUNT, PDF_COVER, PDF_CREATIONDATE, PDF_CREATOR, PDF_CROPBOX, PDF_CS, PDF_CSP, PDF_D, PDF_DA, PDF_DATE, PDF_DATE_FORMAT, PDF_DCTDECODE, PDF_DCTDECODE_NEW, PDF_DECODEPARMS, PDF_DESC, PDF_DESCENDANT, PDF_DESCENDANT_FONTS, PDF_DESCENT, PDF_DESTINATION, PDF_DESTS, PDF_DEVICE_CMYK, PDF_DEVICE_GRAY, PDF_DEVICE_RGB, PDF_DI, PDF_DICTEND, PDF_DICTSTART, PDF_DIRECTION, PDF_DISPLAY_DOCTITLE, PDF_DISPLAY_DURATION, PDF_DISSOLVE, PDF_DM, PDF_DOC_SUBJECT, PDF_DOS, PDF_DP, PDF_DR, PDF_DS, PDF_DV, PDF_DW, PDF_E, PDF_EF, PDF_EMBEDDEDFILE, PDF_EMBEDDEDFILES, PDF_EMC, PDF_ENCODING, PDF_ENCRYPT, PDF_ENDOBJ, PDF_ENDPATH, PDF_ENDSTREAM, PDF_ENDTEXT, PDF_EOCLIP, PDF_EOF, PDF_EXTGSTATE, PDF_F, PDF_FADE, PDF_FALSE, PDF_FDESCRIPTOR, PDF_FIELD_FLAG, PDF_FIELDS, PDF_FILEATTACHMENTANNOT, PDF_FILESPEC, PDF_FILTER, PDF_FIRST, PDF_FIRST_PAGE, PDF_FIRSTCHAR, PDF_FIT, PDF_FIT_WINDOW, PDF_FITB, PDF_FITBH, PDF_FITBV, PDF_FITH, PDF_FITR, PDF_FITV, PDF_FIXEDPRINT, PDF_FLAGS, PDF_FLATE, PDF_FLATE_NEW, PDF_FLY, PDF_FO, PDF_FONT, PDF_FONTBBOX, PDF_FONTFILE, PDF_FONTFILE_2, PDF_FontFile_3, PDF_FONTNAME, PDF_FONTNAMEPREFIX, PDF_FORM, PDF_FORMFEED, PDF_FORMFONTPREFIX, PDF_FREE_TEXT_TYPEWRITER, PDF_FREETEXTANNOT, PDF_FS, PDF_FT, PDF_FULLSCREEN, PDF_GLITTER, PDF_GOTO_ACTION, PDF_GROUP, PDF_GS, PDF_H, PDF_HEADER, PDF_HEIGHT, PDF_HEXSTRINGEND, PDF_HEXSTRINGSTART, PDF_HIDE_MENUBAR, PDF_HIDE_TOOLBAR, PDF_HIDE_WINDOWUI, PDF_HORIZ_STEM, PDF_HORIZONTAL, PDF_I, PDF_IC, PDF_ID, PDF_IDS, PDF_IF, PDF_IMAGE, PDF_IMAGEB, PDF_IMAGEC, PDF_IMAGEI, PDF_IMPORTDATA, PDF_INDEX, PDF_INDEXED, PDF_INFO, PDF_INK, PDF_INKLIST, PDF_INWARD, PDF_IT, PDF_ITALANGLE, PDF_IX, PDF_JAVASCRIPT, PDF_JAVASCRIPT_ACTION, PDF_JS, PDF_KEYSTROKE, PDF_KEYWORDS, PDF_KIDS, PDF_L, PDF_L2R, PDF_LANG, PDF_LAST, PDF_LAST_PAGE, PDF_LASTCHAR, PDF_LAUNCH_ACTION, PDF_LE, PDF_LEGAL, PDF_LENGTH, PDF_LENGTH_1, PDF_LENGTH_2, PDF_LENGTH_3, PDF_LF, PDF_LINEANNOT, PDF_LINKANNOT, PDF_LITERALSTRINGEND, PDF_LITERALSTRINGSTART, PDF_LZWDECODE, PDF_M, PDF_MAC, PDF_MARKINFO, PDF_MAXLEN, PDF_MAXWIDTH, PDF_MEDIABOX, PDF_METADATA, PDF_MISSINGWIDTH, PDF_MK, PDF_MODDATE, PDF_N, PDF_NAME, PDF_NAMED, PDF_NAMED_ACT_FIND, PDF_NAMED_ACT_OPEN, PDF_NAMED_ACT_PRINT, PDF_NAMED_ACT_SEARCH, PDF_NAMES, PDF_NAMESTART, PDF_NEEDAPPEARANCES, PDF_NEWLINE, PDF_NEWWINDOW, PDF_NEXT, PDF_NEXT_PAGE, PDF_NO_COMP_OBJ, PDF_NONFULLSCREEN_PAGEMODE, PDF_NULL, PDF_O, PDF_OBJ, PDF_OBJSTREAM, PDF_OCPROPERTIES, PDF_OFF, PDF_ONECOLUMN, PDF_OPEN, PDF_OPEN_ACTION, PDF_OPT, PDF_OUTLINES, PDF_OUTPUTINTENTS, PDF_OUTWARD, PDF_P, PDF_PAGE, PDF_PAGECLOSE, PDF_PAGEINVISIBLE, PDF_PAGELABELS, PDF_PAGELAYOUT, PDF_PAGEMODE, PDF_PAGEOPEN, PDF_PAGES, PDF_PAGEVISIBLE, PDF_PAINT_TYPE, PDF_PARAMS, PDF_PARENT, PDF_PATTERN, PDF_PATTERN_TYPE, PDF_PBD, PDF_PC, PDF_PDC, PDF_PDF, PDF_PERMS, PDF_PFD, PDF_PH, PDF_PIECEINFO, PDF_POLYGONANNOT, PDF_POLYLINEANNOT, PDF_POPUP, PDF_PREDICTOR, PDF_PREV, PDF_PREV_PAGE, PDF_PROCSET, PDF_PRODUCER, PDF_PROPERTIES, PDF_PUSH, PDF_PV, PDF_Q, PDF_QUADPOINTS, PDF_R, PDF_R2L, PDF_RC, PDF_RD, PDF_RE, PDF_RECALCULATE, PDF_RECT, PDF_REMOTEGOTO_ACTION, PDF_RENDITIONS, PDF_REPLACE, PDF_RESET_FORM, PDF_RESOURCES, PDF_RESTORE_GS, PDF_RI, PDF_ROOT, PDF_ROTATE, PDF_RUNLENGTH, PDF_RUNLENGTH_NEW, PDF_S, PDF_SCN, PDF_SHADING, PDF_SHOWIMG, PDF_SHOWTEXT, PDF_SINGLE_QUOTES, PDF_SINGLEPAGE, PDF_SIZE, PDF_SP, PDF_SPIDERINFO, PDF_SPLIT, PDF_SQUAREANNOT, PDF_SS, PDF_STAMPANNOT, PDF_STARTXREF, PDF_STORE_GS, PDF_STREAM, PDF_STRUCT_TREE, PDF_SUBMIT_FORM, PDF_SUBTYPE, PDF_T, PDF_TAB, PDF_TEMPLATES, PDF_TEXT, PDF_TEXTANNOT, PDF_TEXTDIMENSION, PDF_TEXTFONT, PDF_TEXTLEAD, PDF_TEXTMATRIX, PDF_TEXTNEWLINESTART, PDF_TEXTRENDER, PDF_TEXTWIDTH, PDF_THREADS, PDF_THUMB, PDF_TILING_TYPE, PDF_TITLE, PDF_TM, PDF_TOUNICODE, PDF_TP, PDF_TRAILER, PDF_TRANSITION, PDF_TRIMBOX, PDF_TRUE, PDF_TRUETYPE, PDF_TU, PDF_TWOCOLUMN_LEFT, PDF_TWOCOLUMN_RIGHT, PDF_TWOPAGE_LEFT, PDF_TWOPAGE_RIGHT, PDF_TX, PDF_TYPE, PDF_TYPE0, PDF_TYPE1, PDF_U, PDF_UNCOVER, PDF_UNIX, PDF_URI_ACTION, PDF_URL, PDF_URLS, PDF_USEATTACHMENTS, PDF_USENONE, PDF_USEOC, PDF_USEOUTLINES, PDF_USETHUMBS, PDF_V, PDF_VALUECHANGE, PDF_VERSION, PDF_VERT_STEM, PDF_VERTICAL, PDF_VERTICES, PDF_VIEWER_PREFERENCES, PDF_W, PDF_WATERMARKANNOT, PDF_WIDGET, PDF_WIDTH, PDF_WIDTHS, PDF_WINANSIENCODING, PDF_WIPE, PDF_X, PDF_XOBJECT, PDF_XREF, PDF_XREFSTMOFFSET, PDF_XREFSTREAM, PDF_XSTEP, PDF_XYZ, PDF_YES, PDF_YSTEP, PIXEL_PER_INCH, RUBICON_EMBEDDED, SITE, TEXT, TWIPS_TO_POINTS
 
Constructor Summary
PdfLinkAnnot()
          Zero-argument default constructor.
PdfLinkAnnot(PdfRect r, Color c)
          Constructs a link annotation with specified annotation rectangle and annotation rectangle color.
PdfLinkAnnot(PdfRect r, int flags)
          Constructs a link annotation with specified annotation rectangle and flags.
PdfLinkAnnot(PdfRect r, int flags, Color c)
          Constructs a link annotation with specified annotation rectangle, flags, and annotation rectangle color.
PdfLinkAnnot(PdfRect r, String subject, String contents, String title)
          Constructs a link annotation with specified annotation rectangle, subject, contents, and title.
PdfLinkAnnot(PdfRect r, String subject, String contents, String title, Color c)
          Constructs a link annotation with specified annotation rectangle, subject, contents, title, and annotation rectangle color.
PdfLinkAnnot(PdfRect r, String subject, String contents, String title, int flags)
          Constructs a link annotation with specified annotation rectangle, subject, contents, title, and flags.
PdfLinkAnnot(PdfRect r, String subject, String contents, String title, int flags, Color c)
          Constructs a link annotation with specified annotation rectangle, subject, contents, title, flags, and annotation rectangle.
PdfLinkAnnot(PdfRect r, String subject, String contents, String title, int flags, Color c, int highlightMode)
          Constructs a link annotation with specified annotation rectangle, subject, contents, title, flags, annotation rectangle color, and highlight mode.
 
Method Summary
 void addAction(PdfAction action)
           
 void addActionGoTo(int pageNo)
          Adds a go-to action to this link annotation linking it to page specified by pageNo.
 void addActionGoTo(int pageNo, double left, double top, double zoom)
          Adds a go-to action to this link annotation linking it to destination specified by position (left, top), page pageNo, and magnification factor zoom.
 void addActionGoTo(int pageNo, double left, double bottom, double right, double top)
          Adds a go-to action to this link annotation linking it to specified rectangular area on specified page.
 void addActionGoTo(int pageNo, double pos, int fit)
          Adds a go-to action to this link annotation linking it to destination specified by pos and fit on page specified by pageNo.
 void addActionJavaScript(String script)
          Adds an action to this annotation making it execute specified Javascript script.
 void addActionLaunch(String applicationToLaunch, boolean print)
          Adds an action to this link annotation making it launch specified application, or open or print specified document.
 void addActionNamed(int actionType)
          Adds action to this link annotation making it perform specified named action.
 void addActionRemoteGoTo(String pdfFilePath, PdfBookmark.RemoteGoTo rGoTo, boolean newWindow)
          Adds a remote go-to action to this link annotation.
 void addActionURI(String uri)
          Adds an action to this link annotation making it launch specified Uniform Resource Identifier (URI).
 List getAllActions()
           
 List getAllActions(int type)
           
 int getHighlightMode()
          Returns constant identifying this link annotation's highlight mode.
static PdfBookmark.RemoteGoTo getRemoteGoToInstance(int pageNo)
          Returns a remote go-to action that leads to page specified by pageNo.
static PdfBookmark.RemoteGoTo getRemoteGoToInstance(int pageNo, double left, double bottom, double right, double top)
          Returns a remote go-to action that leads to specified rectangular area on specified page.
static PdfBookmark.RemoteGoTo getRemoteGoToInstance(int pageNo, double pos, int fit)
          Returns a remote go-to action that leads to destination specified by pos and fit on page specified by pageNo.
static PdfBookmark.RemoteGoTo getRemoteGoToInstance(int pageNo, int fit)
          Returns a remote go-to action that leads to page specified by pageNo and displays the page with its entire height and width tightly fit inside the window.
static PdfBookmark.RemoteGoTo getRemoteGoToInstance(int pageNo, PdfRect rect)
          Returns a remote go-to action that leads to specified rectangle on page specified by pageNo.
 void removeAction(int type)
          Removes action of specified type that was first added to this link annotation.
 void removeAllActions()
          Removes all actions that were added to this link annotation.
 void removeAllActions(int type)
          Removes all actions of specified type that were added to this link annotation.
 void setHighlightMode(int highlightMode)
          Specifies this link annotation's highlight mode.
 
Methods inherited from class com.gnostice.pdfone.PdfAnnot
getAnnotName, getBorderStyle, getBorderWidth, getBottom, getColor, getContents, getDashPattern, getFlags, getLeft, getRect, getRight, getSubject, getTitle, getTop, getType, hashCode, isShowRect, setAnnotName, setBorderStyle, setBorderWidth, setColor, setContents, setDashPattern, setFlags, setRect, setRect, setRect, setRect, setRect, setShowRect, setSubject, setTitle
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIGHLIGHT_MODE_NONE

public static final int HIGHLIGHT_MODE_NONE
Highlight mode for displaying contents of annotation rectangle without any change from their normal appearance.

See Also:
Constant Field Values
Sample Code
See example.

HIGHLIGHT_MODE_INVERT

public static final int HIGHLIGHT_MODE_INVERT
Highlight mode for displaying contents of annotation rectangle inverted.

See Also:
Constant Field Values
Sample Code
See example.

HIGHLIGHT_MODE_OUTLINE

public static final int HIGHLIGHT_MODE_OUTLINE
Highlight mode for displaying border of annotation rectangle inverted.

See Also:
Constant Field Values
Sample Code
See example.

HIGHLIGHT_MODE_PUSH

public static final int HIGHLIGHT_MODE_PUSH
Highlight mode for displaying contents of annotation rectangle as if they were pushed from below the surface of the page.

See Also:
Constant Field Values
Sample Code
See example.

FITH

public static final int FITH
Constant for adjusting magnification (zoom) factor of a page to tightly fit its entire width inside a window.

See Also:
Constant Field Values

FITBH

public static final int FITBH
Constant for adjusting magnification (zoom) factor of a page to tightly fit entire width of its bounding box inside a window.

See Also:
Constant Field Values

FITBV

public static final int FITBV
Constant for adjusting magnification (zoom) factor of a page to tightly fit entire height of its bounding box inside a window.

See Also:
Constant Field Values

FITV

public static final int FITV
Constant for adjusting magnification (zoom) factor of a page to tightly fit its entire height inside a window.

See Also:
Constant Field Values

FITB

public static final int FITB
Constant for adjusting magnification (zoom) factor of a page to tightly fit entire height and width of its bounding box inside a window.

See Also:
Constant Field Values
Constructor Detail

PdfLinkAnnot

public PdfLinkAnnot()
Zero-argument default constructor.

Since:
1.0
Sample Code
See example.

PdfLinkAnnot

public PdfLinkAnnot(PdfRect r,
                    String subject,
                    String contents,
                    String title,
                    int flags,
                    Color c,
                    int highlightMode)
Constructs a link annotation with specified annotation rectangle, subject, contents, title, flags, annotation rectangle color, and highlight mode.

Parameters:
r - annotation rectangle
subject - text to be used as the annotation's subject
contents - text to be used as the annotation's contents
title - text to be displayed in the annotation's title bar
flags - flag or combined value of flags representing characteristics of the annotation
c - color of the annotation rectangle
highlightMode - highlight mode
Sample Code
See example.

PdfLinkAnnot

public PdfLinkAnnot(PdfRect r,
                    String subject,
                    String contents,
                    String title)
Constructs a link annotation with specified annotation rectangle, subject, contents, and title.

Parameters:
r - annotation rectangle
subject - text to be used as the annotation's subject
contents - text to be used as the annotation's contents
title - text to be displayed in the annotation's title bar
Sample Code
See example.

PdfLinkAnnot

public PdfLinkAnnot(PdfRect r,
                    String subject,
                    String contents,
                    String title,
                    Color c)
Constructs a link annotation with specified annotation rectangle, subject, contents, title, and annotation rectangle color.

Parameters:
r - annotation rectangle
subject - text to be used as the annotation's subject
contents - text to be used as the annotation's contents
title - text to be displayed in the annotation's title bar
c - color of the annotation rectangle
Sample Code
See example.

PdfLinkAnnot

public PdfLinkAnnot(PdfRect r,
                    String subject,
                    String contents,
                    String title,
                    int flags)
Constructs a link annotation with specified annotation rectangle, subject, contents, title, and flags.

Parameters:
r - annotation rectangle
subject - text to be used as the annotation's subject
contents - text to be used as the annotation's contents
title - text to be displayed in the annotation's title bar
flags - flag or combined value of flags representing characteristics of the annotation
Sample Code
See example.

PdfLinkAnnot

public PdfLinkAnnot(PdfRect r,
                    String subject,
                    String contents,
                    String title,
                    int flags,
                    Color c)
Constructs a link annotation with specified annotation rectangle, subject, contents, title, flags, and annotation rectangle.

Parameters:
r - annotation rectangle
subject - text to be used as the annotation's subject
contents - text to be used as the annotation's contents
title - text to be displayed in the annotation's title bar
flags - flag or combined value of flags representing characteristics of the annotation
c - color of the annotation rectangle
Sample Code
See example.

PdfLinkAnnot

public PdfLinkAnnot(PdfRect r,
                    int flags)
Constructs a link annotation with specified annotation rectangle and flags.

Parameters:
r - annotation rectangle
flags - flag or combined value of flags representing characteristics of the annotation
Sample Code
See example.

PdfLinkAnnot

public PdfLinkAnnot(PdfRect r,
                    int flags,
                    Color c)
Constructs a link annotation with specified annotation rectangle, flags, and annotation rectangle color.

Parameters:
r - annotation rectangle
flags - flag or combined value of flags representing characteristics of the annotation
c - color of the annotation rectangle
Sample Code
See example.

PdfLinkAnnot

public PdfLinkAnnot(PdfRect r,
                    Color c)
Constructs a link annotation with specified annotation rectangle and annotation rectangle color.

Parameters:
r - annotation rectangle
c - color of the annotation rectangle
Sample Code
See example.
Method Detail

getRemoteGoToInstance

public static PdfBookmark.RemoteGoTo getRemoteGoToInstance(int pageNo)
Returns a remote go-to action that leads to page specified by pageNo.

Parameters:
pageNo - number of the page
Returns:
a remote go-to action
Since:
1.0
Sample Code
See example.

getRemoteGoToInstance

public static PdfBookmark.RemoteGoTo getRemoteGoToInstance(int pageNo,
                                                           double pos,
                                                           int fit)
Returns a remote go-to action that leads to destination specified by pos and fit on page specified by pageNo. As this is a remote destination, the coordinates of pos are specified assuming that position (0, 0) represents the bottom-left corner of the page.
 
fit pos How page is displayed
FITH vertical coordinate of top-left corner of window on the page
  • pos is positioned on the top edge of the window
  • Page magnification (zoom) factor is adjusted to tightly fit the entire width of the page inside the window
FITBH vertical coordinate of top-left corner of window on the page
  • pos is positioned on top edge of the window
  • Page magnification (zoom) factor is adjusted to tightly fit the entire width of its bounding box inside the window
FITBV horizontal coordinate of top-left corner of window on the page
  • pos is positioned on the left edge of the window
  • Page magnification (zoom) factor is adjusted to tightly fit the entire height of its bounding box inside the window
FITV horizontal coordinate of top-left corner of window on the page
  • pos is positioned on the left edge of the window
  • Page magnification (zoom) factor is adjusted to tightly fit the entire height of the page inside the window

Parameters:
pageNo - number of the page
pos - horizontal or vertical coordinate of top-left corner of window on the page
fit - constant for specifying magnification (zoom) factor of the page
Returns:
remote go-to action
Since:
1.0
Sample Code
See example.

getRemoteGoToInstance

public static PdfBookmark.RemoteGoTo getRemoteGoToInstance(int pageNo,
                                                           int fit)
Returns a remote go-to action that leads to page specified by pageNo and displays the page with its entire height and width tightly fit inside the window.

Parameters:
pageNo - number of the page
fit - constant for specifying magnification (zoom) factor of the page (Always is FITB)
Returns:
a remote go-to action
Since:
1.0
Sample Code
See example.

getRemoteGoToInstance

public static PdfBookmark.RemoteGoTo getRemoteGoToInstance(int pageNo,
                                                           PdfRect rect)
Returns a remote go-to action that leads to specified rectangle on page specified by pageNo.

Parameters:
pageNo - number of the page
rect - rectangle on the page
Returns:
a remote go-to action
Since:
1.0
Sample Code
See example.

getRemoteGoToInstance

public static PdfBookmark.RemoteGoTo getRemoteGoToInstance(int pageNo,
                                                           double left,
                                                           double bottom,
                                                           double right,
                                                           double top)
Returns a remote go-to action that leads to specified rectangular area on specified page.

Parameters:
pageNo - number of the page
left - distance from left edge of the page to the left edge of the rectangular area
bottom - distance from bottom edge of the page to the bottom edge of the rectangular area
right - distance from right edge of the page to the left edge of the rectangular area
top - distance from top edge of the page to the bottom edge of the rectangular area
Returns:
remote go-to action
Since:
1.0
Sample Code
See example.

getHighlightMode

public int getHighlightMode()
Returns constant identifying this link annotation's highlight mode.

Returns:
constant identifying the highlight mode
Since:
1.0
See Also:
setHighlightMode(int)

setHighlightMode

public void setHighlightMode(int highlightMode)
Specifies this link annotation's highlight mode.

Parameters:
highlightMode - constant specifying the highlight mode
Since:
1.0

addActionGoTo

public void addActionGoTo(int pageNo,
                          double left,
                          double top,
                          double zoom)
                   throws PdfException
Adds a go-to action to this link annotation linking it to destination specified by position (left, top), page pageNo, and magnification factor zoom.

Parameters:
pageNo - destination page number
left - x-coordinate of the top-left corner of the window on the page
top - y-coordinate of the top-left corner of the window on the page
zoom - magnification (zoom) factor to be applied when displaying the page
Throws:
PdfException - if an illegal argument is supplied.
Since:
1.0
Sample Code
See example.

addActionGoTo

public void addActionGoTo(int pageNo)
                   throws PdfException
Adds a go-to action to this link annotation linking it to page specified by pageNo.

Parameters:
pageNo - number of the page
Throws:
PdfException - if an illegal argument is supplied.
Since:
1.0
Sample Code
See example.

addActionGoTo

public void addActionGoTo(int pageNo,
                          double pos,
                          int fit)
                   throws PdfException
Adds a go-to action to this link annotation linking it to destination specified by pos and fit on page specified by pageNo.
 
fit pos How page is displayed
FITH vertical coordinate of top-left corner of window on the page
  • pos is positioned on the top edge of the window
  • Page magnification (zoom) factor is adjusted to tightly fit the entire width of the page inside the window
FITBH vertical coordinate of top-left corner of window on the page
  • pos is positioned on top edge of the window
  • Page magnification (zoom) factor is adjusted to tightly fit the entire width of its bounding box inside the window
FITBV horizontal coordinate of top-left corner of window on the page
  • pos is positioned on the left edge of the window
  • Page magnification (zoom) factor is adjusted to tightly fit the entire height of its bounding box inside the window
FITV horizontal coordinate of top-left corner of window on the page
  • pos is positioned on the left edge of the window
  • Page magnification (zoom) factor is adjusted to tightly fit the entire height of the page inside the window

Parameters:
pageNo - number of the page
pos - horizontal or vertical coordinate of top-left corner of the window on the page
fit - constant for specifying magnification (zoom) factor of the page
Throws:
PdfException - if an illegal argument is supplied.
Since:
1.0
Sample Code
See example.

addActionGoTo

public void addActionGoTo(int pageNo,
                          double left,
                          double bottom,
                          double right,
                          double top)
                   throws PdfException
Adds a go-to action to this link annotation linking it to specified rectangular area on specified page.

Parameters:
pageNo - number of the page
left - distance from the left edge of the page to the left edge of the annotation rectangle
bottom - distance from the top edge of the page to the bottom edge of the annotation rectangle
right - distance from the left edge of the page to the right edge of the annotation rectangle
top - distance from the top edge of the page to the top edge of the annotation rectangle
Throws:
PdfException - if an illegal argument is supplied.
Since:
1.0
Sample Code
See example.

addActionRemoteGoTo

public void addActionRemoteGoTo(String pdfFilePath,
                                PdfBookmark.RemoteGoTo rGoTo,
                                boolean newWindow)
                         throws PdfException
Adds a remote go-to action to this link annotation.

Parameters:
pdfFilePath - pathname of the PDF file containing the action's destination
rGoTo - remote go-to action
newWindow - whether a new window is to be opened to perform the remote go-to action
Throws:
PdfException - if an illegal argument is supplied.
Since:
1.0
Sample Code
See example.

addActionNamed

public void addActionNamed(int actionType)
Adds action to this link annotation making it perform specified named action.

Parameters:
actionType - named action
Since:
1.0
Sample Code
See example.

addActionLaunch

public void addActionLaunch(String applicationToLaunch,
                            boolean print)
Adds an action to this link annotation making it launch specified application, or open or print specified document.

Parameters:
applicationToLaunch - pathname of the application or document
print - whether the document is to be printed
Since:
1.0
Sample Code
See example.

addAction

public void addAction(PdfAction action)
               throws PdfException
Throws:
PdfException

getAllActions

public List getAllActions()

getAllActions

public List getAllActions(int type)
                   throws PdfException
Throws:
PdfException

addActionURI

public void addActionURI(String uri)
Adds an action to this link annotation making it launch specified Uniform Resource Identifier (URI).

Parameters:
uri - Uniform Resource Identifier (URI) that needs to be launched
Since:
1.0
Sample Code
See example.

addActionJavaScript

public void addActionJavaScript(String script)
Adds an action to this annotation making it execute specified Javascript script.

Parameters:
script - Javascript script that needs to be executed
Since:
1.0
Sample Code
See example.

removeAction

public void removeAction(int type)
                  throws PdfException
Removes action of specified type that was first added to this link annotation.

Parameters:
type - constant specifying the action type
Throws:
PdfException - if an illegal argument is supplied.
Since:
1.0
See Also:
PdfAction

removeAllActions

public void removeAllActions(int type)
                      throws PdfException
Removes all actions of specified type that were added to this link annotation.

Parameters:
type - constant specifying the action type
Throws:
PdfException - if an illegal argument is supplied.
Since:
1.0
See Also:
PdfAction

removeAllActions

public void removeAllActions()
Removes all actions that were added to this link annotation.

Since:
1.0

Gnostice PDFOne
Pro. Ed. v1.41

To contact our support team, send an e-mail to support@gnostice.com.
 
© 2006 Gnostice Information Technologies Private Limited. All rights reserved.
www.gnostice.com