|
Gnostice PDFOne
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gnostice.pdfone.PdfAction
com.gnostice.pdfone.PdfRemoteGotoAction
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 |
public PdfRemoteGotoAction(String pdfFilePath, int pageNo, boolean newWindow)
pdfFilePath
- pathname of the external PDF filepageNo
- number of the page in the external PDF file that
needs to be displayed firstnewWindow
- whether the external PDF file should be opened in a
new windowpublic PdfRemoteGotoAction(String pdfFilePath, int pageNo, double left, double top, double zoom, boolean newWindow)
pdfFilePath
- pathname of the external PDF filepageNo
- number of the page in the external PDF file that
needs to be displayedleft
- x-coordinate of the location on the page where the
top edge of the viewer application window should be
placedtop
- y-coordinate of the location on the page where the
top edge of the viewer application window should be
placedzoom
- magnification with which the page should be
displayed in the viewer windownewWindow
- whether the external PDF file should be opened in a
new windowpublic PdfRemoteGotoAction(String pdfFilePath, int pageNo, double x, double y, double width, double height, boolean newWindow)
pdfFilePath
- pathname of the external PDF filepageNo
- number of the page in the external PDF file that
needs to be displayedx
- x-coordinate of the location on the page where the
top edge of the viewer application window should be
placedy
- y-coordinate of the location on the page where the
top edge of the viewer application window should be
placedwidth
- width of the rectangular area that needs to be
displayed inside the viewer windowheight
- height of the rectangular area that needs to be
displayed inside the viewer windownewWindow
- whether the external PDF file should be opened in a
new windowpublic PdfRemoteGotoAction(String pdfFilePath, int pageNo, double pos, int fit, boolean newWindow) throws PdfException
pdfFilePath
- pathname of the external PDF filepageNo
- number of the page in the external PDF file that
needs to be displayedpos
- position of an edge of the viewer window on the pagefit
- 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
PdfException
- if an illegal argument is supplied.public PdfRemoteGotoAction(String pdfFilePath, int pageNo, int fit, boolean newWindow) throws PdfException
pdfFilePath
- pathname of the external PDF filepageNo
- number of the page in the external PDF file that
needs to be displayedfit
- 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
PdfException
- if an illegal argument is supplied.public PdfRemoteGotoAction(String pdfFilePath, int pageNo, PdfRect rect, boolean newWindow)
pdfFilePath
- pathname of the external PDF filepageNo
- number of the page in the external PDF file that
needs to be displayedrect
- rectangular area on the page where the viewer window
needs to be positionednewWindow
- whether the external PDF file should be opened in a
new windowMethod Detail |
public void setDestination(double left, double top, double zoom)
public void setDestination(double x, double y, double width, double height)
public void setDestination(double pos, int fit) throws PdfException
PdfException
public void setDestination(int fit) throws PdfException
PdfException
public void setDestination(PdfRect rect)
public int getFit()
public double getLeft()
public boolean isNewWindow()
setNewWindow(boolean)
public void setNewWindow(boolean newWindow)
newWindow
- whether a new window of the viewer application needs
to be openedisNewWindow()
public int getPageNo()
setPageNo(int)
public void setPageNo(int pageNo)
pageNo
- number of the pagegetPageNo()
public String getPdfFilePath()
setPdfFilePath(String)
public void setPdfFilePath(String pdfFilePath)
pdfFilePath
- pathname of the external PDF filegetPdfFilePath()
public double getPos()
public double getTop()
public double getZoom()
public PdfRect getRect()
public int getDestinationType()
|
Pro. Ed. v5.0.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |