Gnostice PDFOne
Pro. Ed. v5.0.0


com.gnostice.pdfone
Class PdfRemoteGotoAction

java.lang.Object
  extended bycom.gnostice.pdfone.PdfAction
      extended bycom.gnostice.pdfone.PdfRemoteGotoAction

public class PdfRemoteGotoAction
extends PdfAction

This class represents a remote go-to action.

PdfWriter writer1 = PdfWriter.fileWriter(
           new File("PdfRemoteGotoAction_example.pdf"));
PdfDocument doc1 = new PdfDocument(writer1);

// Create a PDF page
PdfPage page1 = new PdfPage();

// Render some text on the page
page1.writeText(
        "Click here to open another document.", 
        200, 100);

// Create a link annotation over a word rendered on page 1
PdfLinkAnnot la = 
    new PdfLinkAnnot(new PdfRect(223, 100, 23, 12), Color.BLUE);

// Create a remote go-to action for navigation into page 3
// of another document in the same directory
PdfRemoteGotoAction rga = 
    new PdfRemoteGotoAction("some_doc.pdf", 3, true);

// Add the remote go-to action to the link annotation
la.addAction(rga);

// Add the link annotation to page 1
page1.addAnnotation(la);

doc1.add(page1);
doc1.setOpenAfterSave(true);
doc1.write();
writer1.dispose();      


Nested Class Summary
 
Nested classes inherited from class com.gnostice.pdfone.PdfAction
PdfAction.PdfEvent
 
Field Summary
 
Fields inherited from class com.gnostice.pdfone.PdfAction
GOTO, JAVASCRIPT, LAUNCH, NAMED, NAMED_FIND, NAMED_FIRSTPAGE, NAMED_LASTPAGE, NAMED_NEXTPAGE, NAMED_OPEN, NAMED_PREVPAGE, NAMED_PRINT, NAMED_SEARCH, REMOTE_GOTO, URI
 
Constructor Summary
PdfRemoteGotoAction(String pdfFilePath, int pageNo, boolean newWindow)
          Constructs a remote go-to action with specified PDF file, number of page, and new-window setting.
PdfRemoteGotoAction(String pdfFilePath, int pageNo, double left, double top, double zoom, boolean newWindow)
          Constructs a remote go-to action with specified PDF file, number of page, location on the page, page magnification, and new-window setting.
PdfRemoteGotoAction(String pdfFilePath, int pageNo, double x, double y, double width, double height, boolean newWindow)
          Constructs a remote go-to action with specified PDF file, number of page, rectangular area on the page, page magnification, and new-window setting.
PdfRemoteGotoAction(String pdfFilePath, int pageNo, double pos, int fit, boolean newWindow)
          Constructs a remote go-to action with specified PDF file, number of page, viewer position on the page, and new-window setting.
PdfRemoteGotoAction(String pdfFilePath, int pageNo, int fit, boolean newWindow)
          Constructs a remote go-to action with specified PDF file, number of a page, page magnification, and new-window setting.
PdfRemoteGotoAction(String pdfFilePath, int pageNo, PdfRect rect, boolean newWindow)
          Constructs a remote go-to action with specified PDF file, number of a page, rectangular area on the page, and and new-window setting.
 
Method Summary
 int getDestinationType()
           
 int getFit()
           
 double getLeft()
           
 int getPageNo()
          Returns number of the page that is linked by the remote go-to action.
 String getPdfFilePath()
          Returns pathname of the external PDF file.
 double getPos()
           
 PdfRect getRect()
           
 double getTop()
           
 double getZoom()
           
 boolean isNewWindow()
          Returns whether a new window of the viewer application will be opened by the action.
 void setDestination(double left, double top, double zoom)
           
 void setDestination(double x, double y, double width, double height)
           
 void setDestination(double pos, int fit)
           
 void setDestination(int fit)
           
 void setDestination(PdfRect rect)
           
 void setNewWindow(boolean newWindow)
          Specifies whether a new window of the viewer application needs to be opened by the action.
 void setPageNo(int pageNo)
          Sets the action to make viewer applications open specified page in the external PDF file.
 void setPdfFilePath(String pdfFilePath)
          Specifies pathname of the external PDF file.
 
Methods inherited from class com.gnostice.pdfone.PdfAction
getActionType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfRemoteGotoAction

public PdfRemoteGotoAction(String pdfFilePath,
                           int pageNo,
                           boolean newWindow)
Constructs a remote go-to action with specified PDF file, number of page, and new-window setting.

Parameters:
pdfFilePath - pathname of the external PDF file
pageNo - number of the page in the external PDF file that needs to be displayed first
newWindow - whether the external PDF file should be opened in a new window

PdfRemoteGotoAction

public PdfRemoteGotoAction(String pdfFilePath,
                           int pageNo,
                           double left,
                           double top,
                           double zoom,
                           boolean newWindow)
Constructs a remote go-to action with specified PDF file, number of page, location on the page, page magnification, and new-window setting.

Parameters:
pdfFilePath - pathname of the external PDF file
pageNo - number of the page in the external PDF file that needs to be displayed
left - x-coordinate of the location on the page where the top edge of the viewer application window should be placed
top - y-coordinate of the location on the page where the top edge of the viewer application window should be placed
zoom - magnification with which the page should be displayed in the viewer window
newWindow - whether the external PDF file should be opened in a new window

PdfRemoteGotoAction

public PdfRemoteGotoAction(String pdfFilePath,
                           int pageNo,
                           double x,
                           double y,
                           double width,
                           double height,
                           boolean newWindow)
Constructs a remote go-to action with specified PDF file, number of page, rectangular area on the page, page magnification, and new-window setting.

Parameters:
pdfFilePath - pathname of the external PDF file
pageNo - number of the page in the external PDF file that needs to be displayed
x - x-coordinate of the location on the page where the top edge of the viewer application window should be placed
y - y-coordinate of the location on the page where the top edge of the viewer application window should be placed
width - width of the rectangular area that needs to be displayed inside the viewer window
height - height of the rectangular area that needs to be displayed inside the viewer window
newWindow - whether the external PDF file should be opened in a new window

PdfRemoteGotoAction

public PdfRemoteGotoAction(String pdfFilePath,
                           int pageNo,
                           double pos,
                           int fit,
                           boolean newWindow)
                    throws PdfException
Constructs a remote go-to action with specified PDF file, number of page, viewer position on the page, and new-window setting.

Parameters:
pdfFilePath - pathname of the external PDF file
pageNo - number of the page in the external PDF file that needs to be displayed
pos - position of an edge of the viewer window on the page
fit - constant determining how page is displayed inside the viewer window; either PdfDestination.FITH, PdfDestination.FITBH, PdfDestination.FITBV, PdfDestination.FITV, PdfDestination.FITB, or PdfDestination.FIT.
newWindow - whether the external PDF file should be opened in a new window
Throws:
PdfException - if an illegal argument is supplied.

PdfRemoteGotoAction

public PdfRemoteGotoAction(String pdfFilePath,
                           int pageNo,
                           int fit,
                           boolean newWindow)
                    throws PdfException
Constructs a remote go-to action with specified PDF file, number of a page, page magnification, and new-window setting.

Parameters:
pdfFilePath - pathname of the external PDF file
pageNo - number of the page in the external PDF file that needs to be displayed
fit - constant specifying how the page needs to accommodated within the viewer window; either PdfDestination.FITB or PdfDestination.FIT.
newWindow - whether the external PDF file should be opened in a new window
Throws:
PdfException - if an illegal argument is supplied.

PdfRemoteGotoAction

public PdfRemoteGotoAction(String pdfFilePath,
                           int pageNo,
                           PdfRect rect,
                           boolean newWindow)
Constructs a remote go-to action with specified PDF file, number of a page, rectangular area on the page, and and new-window setting.

Parameters:
pdfFilePath - pathname of the external PDF file
pageNo - number of the page in the external PDF file that needs to be displayed
rect - rectangular area on the page where the viewer window needs to be positioned
newWindow - whether the external PDF file should be opened in a new window
Method Detail

setDestination

public void setDestination(double left,
                           double top,
                           double zoom)

setDestination

public void setDestination(double x,
                           double y,
                           double width,
                           double height)

setDestination

public void setDestination(double pos,
                           int fit)
                    throws PdfException
Throws:
PdfException

setDestination

public void setDestination(int fit)
                    throws PdfException
Throws:
PdfException

setDestination

public void setDestination(PdfRect rect)

getFit

public int getFit()

getLeft

public double getLeft()

isNewWindow

public boolean isNewWindow()
Returns whether a new window of the viewer application will be opened by the action.

Returns:
whether a new window of the viewer application will be opened by the action
See Also:
setNewWindow(boolean)

setNewWindow

public void setNewWindow(boolean newWindow)
Specifies whether a new window of the viewer application needs to be opened by the action.

Parameters:
newWindow - whether a new window of the viewer application needs to be opened
See Also:
isNewWindow()

getPageNo

public int getPageNo()
Returns number of the page that is linked by the remote go-to action.

Returns:
number of the page that is linked by the remote go-to action
See Also:
setPageNo(int)

setPageNo

public void setPageNo(int pageNo)
Sets the action to make viewer applications open specified page in the external PDF file.

Parameters:
pageNo - number of the page
See Also:
getPageNo()

getPdfFilePath

public String getPdfFilePath()
Returns pathname of the external PDF file.

Returns:
pathname of the external PDF file
See Also:
setPdfFilePath(String)

setPdfFilePath

public void setPdfFilePath(String pdfFilePath)
Specifies pathname of the external PDF file.

Parameters:
pdfFilePath - pathname of the external PDF file
See Also:
getPdfFilePath()

getPos

public double getPos()

getTop

public double getTop()

getZoom

public double getZoom()

getRect

public PdfRect getRect()

getDestinationType

public int getDestinationType()

Gnostice PDFOne
Pro. Ed. v5.0.0

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