|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IViewer
Common interface used for the viewer components.
| Field Summary | |
|---|---|
static int |
PAGELAYOUT_1X1
|
static int |
PAGELAYOUT_2X1
|
static int |
PAGELAYOUT_2X2
|
static int |
PAGEZOOM_FITPAGE
|
static int |
PAGEZOOM_FITWIDTH
|
| Method Summary | |
|---|---|
boolean |
closeDocument()
Closes the current displayed document. |
java.awt.print.PageFormat |
getPageFormat(int pageIndex)
Returns the page format in page space. |
int |
getPageIndex()
Returns the current displayed page index. |
int |
getPageLayout()
Returns the current page layout. |
int |
getPageRotation()
return the page orientation. typically, 0,90,180 or 270 |
int |
getPageZoom()
returns the current zoom factor applied to the page. the integer value is a percentage. |
int |
getPageZoomMode()
returns the zoom mode, either PAGEZOOM_FITPAGE or PAGEZOOM_FITWIDTH |
PdfDocument |
getPdfDocument()
returns the underlying PDF document, or null if none displayed |
boolean |
isDocumentLoaded()
return true if document is loaded and displayed |
void |
printCurrentPage()
Shows a dialog to print the current page. |
void |
printDocument()
Shows a dialog to print the document. |
void |
printPageRange(int startIndex,
int endIndex)
Shows a dialog to print a page range. |
void |
setDocument(java.io.File pathToPDF)
Loads and Displays the given document in the rendering panel. |
void |
setDocument(java.io.File pathToPDF,
ICredentials credentials)
Displays the given document in the rendering panel using the given credentials. |
void |
setDocument(PdfDocument thedoc)
Loads and Displays the given document in the rendering panel. |
void |
setPageIndex(int pageNumber)
Forces the renderer to display the given page index. |
void |
setPageLayout(int layout)
Changes how many pages are displayed per screen. |
void |
setPageRotation(int rotation)
Sets the page orientation. |
void |
setPageZoom(int percentage)
Sets the zoom factor. the value is a percentage. the zoom factor interpretation is heavily dependent on the zoom mode. |
void |
setPageZoomMode(int mode)
Sets the zoom mode, either PAGEZOOM_FITPAGE or PAGEZOOM_FITWIDTH. |
void |
setZoomTo(int pageIndex,
java.awt.geom.Point2D location,
int zoomFactor)
Centers the viewer scroll panel to the given page index, point location and zoom factor. |
void |
setZoomToArea(int pageIndex,
java.awt.geom.Point2D upperLeft,
java.awt.geom.Point2D bottomRight)
|
| Field Detail |
|---|
static final int PAGELAYOUT_1X1
static final int PAGELAYOUT_2X1
static final int PAGELAYOUT_2X2
static final int PAGEZOOM_FITPAGE
static final int PAGEZOOM_FITWIDTH
| Method Detail |
|---|
boolean closeDocument()
java.awt.print.PageFormat getPageFormat(int pageIndex)
throws PdfException,
java.io.IOException
pageIndex - the page index [1 to max]
java.io.IOException - Raised if a problem occurred while reading the file.
PdfException - Raised if a problem occurred while parsing the file.
int getPageIndex()
throws PdfException
PdfException
int getPageLayout()
throws PdfException
PdfException - pdf related issuesint getPageRotation()
int getPageZoom()
throws PdfException
PdfException - pdf related issues
int getPageZoomMode()
throws PdfException
PdfException - pdf related issuesPdfDocument getPdfDocument()
boolean isDocumentLoaded()
void printCurrentPage()
throws PdfException
PdfExceptionvoid printDocument()
void printPageRange(int startIndex,
int endIndex)
startIndex - start page index [1,+]endIndex - end page index [1,+]
void setDocument(PdfDocument thedoc)
throws PdfException
pathToPDF - path to the document
java.io.IOException - issue related to io and caching
PdfException - issue related to PDF
PdfAuthException - issue with authentication
void setDocument(java.io.File pathToPDF)
throws java.io.IOException,
PdfException,
PdfAuthException
pathToPDF - path to the document
java.io.IOException - issue related to io and caching
PdfException - issue related to PDF
PdfAuthException - issue with authentication
void setDocument(java.io.File pathToPDF,
ICredentials credentials)
throws java.io.IOException,
PdfException,
PdfAuthException
pathToPDF - path to the document, if null - the current document is
closed.credentials - password or certificate credentials to open the document
java.io.IOException - issue related to io and caching
PdfException - issue related to PDF
PdfAuthException - issue with authenticationvoid setPageIndex(int pageNumber)
pageNumber - the page index to display
void setPageLayout(int layout)
throws PdfException
layout - 1,2 (2x1) or 4 (2x2)
PdfException - pdf related issuesvoid setPageRotation(int rotation)
rotation - the page rotation is degrees, typically 0,90,180 or 270void setPageZoom(int percentage)
percentage - an integer value which represents a zoom percentage.
void setPageZoomMode(int mode)
throws PdfException
mode - either PAGEZOOM_FITPAGE or PAGEZOOM_FITWIDTH
PdfException - pdf related issues
void setZoomTo(int pageIndex,
java.awt.geom.Point2D location,
int zoomFactor)
throws PdfException,
java.io.IOException
pageIndex - the index of the page to zoom onto [1, max]location - the location in PageSpace of the point to center onzoomFactor - zoom factor to , use -1 to set unchanged
PdfException
java.io.IOException
void setZoomToArea(int pageIndex,
java.awt.geom.Point2D upperLeft,
java.awt.geom.Point2D bottomRight)
throws PdfException,
java.io.IOException
pageIndex - the index of the page to zoom onto [1, max]upperLeft - bottomRight -
PdfException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||