| Modifier and Type | Class and Description |
|---|---|
| public static interface | PDFView.
The interface that needs to be implemented by any model object that represents a PDF document and that wants to be displayed by the view. |
| public static interface | PDFView.
Documents that can be searched for a given text need to implement this interface and return a list of search results. |
| public static class | PDFView.
Represent a single match in the document. |
| Modifier and Type | Field and Description |
|---|---|
| private final BooleanProperty | cacheThumbnails
Caching thumbnails can be useful for low powered systems with enough memory. |
| private final ObjectProperty | document
The currently loaded and displayed PDF document. |
| private final DoubleProperty | maxZoomFactor
Sets the upper bounds for zoom operations. |
| private final IntegerProperty | page
Stores the number of the currently showing page. |
| private final DoubleProperty | pageRotation
The page rotation in degrees. |
| private final FloatProperty | pageScale
The resolution / scale at which the main page will be rendered. |
| private final ObjectProperty | |
| private final ListProperty | |
| private final StringProperty | searchText
A text used for searching inside the document. |
| private final ObjectProperty | |
| private final BooleanProperty | showAll
A flag that controls whether we always want to show the entire page. |
| private final BooleanProperty | showSearchResults
A flag used to control whether the view will display aggregated search results on the left-hand side. |
| private final BooleanProperty | showThumbnails
A flag used to control whether the view will display a thumbnail version of the pages on the left-hand side. |
| private final BooleanProperty | showToolBar
A flag used to control whether the view will include a toolbar with zoom, search, rotation controls. |
| private final FloatProperty | thumbnailPageScale
The resolution / scale at which the thumbnails will be rendered. |
| private final DoubleProperty | thumbnailSize
The size used for the images displayed in the thumbnail view. |
| private final DoubleProperty | zoomFactor
The current zoom factor. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final BooleanProperty | |
| protected Skin | createDefaultSkin()
Overrides javafx. Create a new instance of the default skin for this control. |
| public final ObjectProperty | |
| public final PDFView. | |
| public final double | |
| public final int | |
| public final double | |
| public final float | |
| public final Color | |
| public final ObservableList | |
| public final String | |
| public final PDFView. | |
| public final float | |
| public final double | |
| public String | getUserAgentStylesheet()
Overrides javafx. An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method. |
| public final double | |
| public final boolean | Returns: true if the operation actually did cause a page changeConvenience method to show the last page. |
| public final boolean | Returns: true if the operation actually did cause a page changeConvenience method to show the next page. |
| public final boolean | Returns: true if the operation actually did cause a page changeConvenience method to show the previous page. |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final void | |
| public final void | |
| public final void | |
| public final DoubleProperty | |
| public final IntegerProperty | |
| public final DoubleProperty | |
| public final FloatProperty | |
| public final void | |
| public final void | |
| public final ObjectProperty | Returns: the search result highlight colorStores the color to be used for highlighting search results. |
| public final ListProperty | Returns: the search resultsStores the list of currently found search results. |
| public final StringProperty | |
| public final ObjectProperty | Returns: the selected search resultStores the currently selected search result. |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final BooleanProperty | |
| public final BooleanProperty | |
| public final BooleanProperty | |
| public final BooleanProperty | |
| public final FloatProperty | |
| public final DoubleProperty | |
| public final void | |
| public final DoubleProperty |
| cacheThumbnails | back to summary |
|---|---|
| private final BooleanProperty cacheThumbnails Caching thumbnails can be useful for low powered systems with enough memory. The default value is "true". When set to "true" each thumbnail image will be added to a hashmap cache, hence making it necessary to only render once. | |
| document | back to summary |
|---|---|
| private final ObjectProperty<PDFView. The currently loaded and displayed PDF document. | |
| maxZoomFactor | back to summary |
|---|---|
| private final DoubleProperty maxZoomFactor Sets the upper bounds for zoom operations. The default value is "4". | |
| page | back to summary |
|---|---|
| private final IntegerProperty page Stores the number of the currently showing page. | |
| pageRotation | back to summary |
|---|---|
| private final DoubleProperty pageRotation The page rotation in degrees. Supported values are only "0", "90", "180", "270", "360", ... multiples of "90". | |
| pageScale | back to summary |
|---|---|
| private final FloatProperty pageScale The resolution / scale at which the main page will be rendered. The default value is "4". The value has direct impact on the size of the images being generated and the memory requirements. Keep low on low powered / low resolution systems and high on large systems with hires displays. | |
| searchResultColor | back to summary |
|---|---|
| private final ObjectProperty<Color> searchResultColor | |
| searchResults | back to summary |
|---|---|
| private final ListProperty<PDFView. | |
| searchText | back to summary |
|---|---|
| private final StringProperty searchText A text used for searching inside the document. Results will be highlighted. | |
| selectedSearchResult | back to summary |
|---|---|
| private final ObjectProperty<PDFView. | |
| showAll | back to summary |
|---|---|
| private final BooleanProperty showAll A flag that controls whether we always want to show the entire page. If "true" then the page will be constantly resized to fit the viewport of the scroll pane in which it is showing. In this mode zooming is not possible. | |
| showSearchResults | back to summary |
|---|---|
| private final BooleanProperty showSearchResults A flag used to control whether the view will display aggregated search results on the left-hand side. | |
| showThumbnails | back to summary |
|---|---|
| private final BooleanProperty showThumbnails A flag used to control whether the view will display a thumbnail version of the pages on the left-hand side. | |
| showToolBar | back to summary |
|---|---|
| private final BooleanProperty showToolBar A flag used to control whether the view will include a toolbar with zoom, search, rotation controls. | |
| thumbnailPageScale | back to summary |
|---|---|
| private final FloatProperty thumbnailPageScale The resolution / scale at which the thumbnails will be rendered. The default value is "1". | |
| thumbnailSize | back to summary |
|---|---|
| private final DoubleProperty thumbnailSize The size used for the images displayed in the thumbnail view. The default value is "200". | |
| zoomFactor | back to summary |
|---|---|
| private final DoubleProperty zoomFactor The current zoom factor. The default value is "1". | |
| PDFView | back to summary |
|---|---|
| public PDFView() Constructs a new view. | |
| cacheThumbnailsProperty | back to summary |
|---|---|
| public final BooleanProperty cacheThumbnailsProperty() | |
| createDefaultSkin | back to summary |
|---|---|
| protected Skin Overrides javafx. Doc from javafx. Create a new instance of the default skin for this control. This is called to create a skin for the control if
no skin is provided via CSS | |
| documentProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| getDocument | back to summary |
|---|---|
| public final PDFView. | |
| getMaxZoomFactor | back to summary |
|---|---|
| public final double getMaxZoomFactor() | |
| getPage | back to summary |
|---|---|
| public final int getPage() | |
| getPageRotation | back to summary |
|---|---|
| public final double getPageRotation() | |
| getPageScale | back to summary |
|---|---|
| public final float getPageScale() | |
| getSearchResultColor | back to summary |
|---|---|
| public final Color getSearchResultColor() | |
| getSearchResults | back to summary |
|---|---|
| public final ObservableList | |
| getSearchText | back to summary |
|---|---|
| public final String getSearchText() | |
| getSelectedSearchResult | back to summary |
|---|---|
| public final PDFView. | |
| getThumbnailPageScale | back to summary |
|---|---|
| public final float getThumbnailPageScale() | |
| getThumbnailSize | back to summary |
|---|---|
| public final double getThumbnailSize() | |
| getUserAgentStylesheet | back to summary |
|---|---|
| public String getUserAgentStylesheet() Overrides javafx. Doc from javafx. An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method. These styles are used in addition to whatever user-agent stylesheets are in use. This provides a mechanism for third parties to introduce styles for custom controls. The URL is a hierarchical URI of the form [scheme:][//authority][path]. If the URL does not have a [scheme:] component, the URL is considered to be the [path] component only. Any leading '/' character of the [path] is ignored and the [path] is treated as a path relative to the root of the application's classpath. Subclasses overriding this method should not assume any particular implementation approach as to the number and frequency with which it is called. For this reason, attempting any kind of dynamic implementation (i.e. returning different user agent stylesheet values) based on some state change is highly discouraged, as there is no guarantee when, or even if, this method will be called. Some JavaFX CSS implementations may choose to cache this response for an indefinite period of time, and therefore there should be no expectation around when this method is called.
For additional information about using CSS with the scene graph,
see the CSS Reference Guide.
| |
| getZoomFactor | back to summary |
|---|---|
| public final double getZoomFactor() | |
| gotoLastPage | back to summary |
|---|---|
| public final boolean gotoLastPage() Convenience method to show the last page.
| |
| gotoNextPage | back to summary |
|---|---|
| public final boolean gotoNextPage() Convenience method to show the next page. This simply increases the
| |
| gotoPreviousPage | back to summary |
|---|---|
| public final boolean gotoPreviousPage() Convenience method to show the previous page. This simply decreases the
| |
| isCacheThumbnails | back to summary |
|---|---|
| public final boolean isCacheThumbnails() | |
| isShowAll | back to summary |
|---|---|
| public final boolean isShowAll() | |
| isShowSearchResults | back to summary |
|---|---|
| public final boolean isShowSearchResults() | |
| isShowThumbnails | back to summary |
|---|---|
| public final boolean isShowThumbnails() | |
| isShowToolBar | back to summary |
|---|---|
| public final boolean isShowToolBar() | |
| load | back to summary |
|---|---|
| public final void load(File file) Loads the given PDF file.
| |
| load | back to summary |
|---|---|
| public final void load(InputStream stream) Loads the given PDF file.
| |
| load | back to summary |
|---|---|
| public final void load(Supplier<PDFView. Sets the document retrieved from the given supplier.
| |
| maxZoomFactorProperty | back to summary |
|---|---|
| public final DoubleProperty maxZoomFactorProperty() | |
| pageProperty | back to summary |
|---|---|
| public final IntegerProperty pageProperty() | |
| pageRotationProperty | back to summary |
|---|---|
| public final DoubleProperty pageRotationProperty() | |
| pageScaleProperty | back to summary |
|---|---|
| public final FloatProperty pageScaleProperty() | |
| rotateLeft | back to summary |
|---|---|
| public final void rotateLeft() Convenience method to rotate the generated image by -90 degrees. | |
| rotateRight | back to summary |
|---|---|
| public final void rotateRight() Convenience method to rotate the generated image by +90 degrees. | |
| searchResultColorProperty | back to summary |
|---|---|
| public final ObjectProperty Stores the color to be used for highlighting search results.
| |
| searchResultsProperty | back to summary |
|---|---|
| public final ListProperty Stores the list of currently found search results.
| |
| searchTextProperty | back to summary |
|---|---|
| public final StringProperty searchTextProperty() | |
| selectedSearchResultProperty | back to summary |
|---|---|
| public final ObjectProperty Stores the currently selected search result.
| |
| setCacheThumbnails | back to summary |
|---|---|
| public final void setCacheThumbnails(boolean cacheThumbnails) | |
| setDocument | back to summary |
|---|---|
| public final void setDocument(PDFView. | |
| setMaxZoomFactor | back to summary |
|---|---|
| public final void setMaxZoomFactor(double maxZoomFactor) | |
| setPage | back to summary |
|---|---|
| public final void setPage(int page) | |
| setPageRotation | back to summary |
|---|---|
| public final void setPageRotation(double pageRotation) | |
| setPageScale | back to summary |
|---|---|
| public final void setPageScale(float pageScale) | |
| setSearchResultColor | back to summary |
|---|---|
| public final void setSearchResultColor(Color searchResultColor) | |
| setSearchResults | back to summary |
|---|---|
| public final void setSearchResults(ObservableList<PDFView. | |
| setSearchText | back to summary |
|---|---|
| public final void setSearchText(String searchText) | |
| setSelectedSearchResult | back to summary |
|---|---|
| public final void setSelectedSearchResult(PDFView. | |
| setShowAll | back to summary |
|---|---|
| public final void setShowAll(boolean showAll) | |
| setShowSearchResults | back to summary |
|---|---|
| public final void setShowSearchResults(boolean showSearchResults) | |
| setShowThumbnails | back to summary |
|---|---|
| public final void setShowThumbnails(boolean showThumbnails) | |
| setShowToolBar | back to summary |
|---|---|
| public final void setShowToolBar(boolean showToolBar) | |
| setThumbnailPageScale | back to summary |
|---|---|
| public final void setThumbnailPageScale(float thumbnailPageScale) | |
| setThumbnailSize | back to summary |
|---|---|
| public final void setThumbnailSize(double thumbnailSize) | |
| setZoomFactor | back to summary |
|---|---|
| public final void setZoomFactor(double zoomFactor) | |
| showAllProperty | back to summary |
|---|---|
| public final BooleanProperty showAllProperty() | |
| showSearchResultsProperty | back to summary |
|---|---|
| public final BooleanProperty showSearchResultsProperty() | |
| showThumbnailsProperty | back to summary |
|---|---|
| public final BooleanProperty showThumbnailsProperty() | |
| showToolBarProperty | back to summary |
|---|---|
| public final BooleanProperty showToolBarProperty() | |
| thumbnailPageScaleProperty | back to summary |
|---|---|
| public final FloatProperty thumbnailPageScaleProperty() | |
| thumbnailSizeProperty | back to summary |
|---|---|
| public final DoubleProperty thumbnailSizeProperty() | |
| unload | back to summary |
|---|---|
| public final void unload() Un-loads currently loaded document. | |
| zoomFactorProperty | back to summary |
|---|---|
| public final DoubleProperty zoomFactorProperty() | |
setDocument(Document), PDFBoxDocument
| Modifier and Type | Class and Description |
|---|---|
| public static class | PDFView.
A specialized exception for signalling processing errors while reading / parsing a PDF file. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public int | Returns: the total number of pagesReturns the total number of pages inside the document. |
| public Pageable | |
| public boolean | Returns: true if the page has to be shown in landscape modethe page pageNumber)Determines if the given page has a landscape orientation. |
| public BufferedImage | Returns: the generated buffered imagethe page number pageNumber, float the scale scale)Renders the page specified by the given number at the given scale. |
| close | back to summary |
|---|---|
| public void close() Closes the document. | |
| getNumberOfPages | back to summary |
|---|---|
| public int getNumberOfPages() Returns the total number of pages inside the document.
| |
| getPageable | back to summary |
|---|---|
| public Pageable getPageable() Returns a set of pages to be printed.
| |
| isLandscape | back to summary |
|---|---|
| public boolean isLandscape(int pageNumber) Determines if the given page has a landscape orientation.
| |
| renderPage | back to summary |
|---|---|
| public BufferedImage renderPage(int pageNumber, float scale) Renders the page specified by the given number at the given scale.
| |
| Access | Constructor and Description |
|---|---|
| public | DocumentProcessingException(Throwable
the reason for the exception cause)Constructs a new processing exception wrapping the given cause. |
| DocumentProcessingException | back to summary |
|---|---|
| public DocumentProcessingException(Throwable cause) Constructs a new processing exception wrapping the given cause.
| |
| Modifier and Type | Method and Description |
|---|---|
| public List | Returns: the list of search resultsthe text for which to search searchText)Returns the list of search results for the given search text. |
| getSearchResults | back to summary |
|---|---|
| public List Returns the list of search results for the given search text.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Rectangle2D | |
| private final int | |
| private final String | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | SearchResult(String
the text for which was searched searchText, String a snippet of the text found at the search hit location textSnippet, int the page where the result can be found pageNumber, Rectangle2D the visual bounds of the search hit marker)Constructs a new search result. |
| Modifier and Type | Method and Description |
|---|---|
| public int | compareTo(PDFView.
the object to be compared. otherImplements java. Compares this object with the specified object for order. |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. Indicates whether some other object is "equal to" this one. |
| public Rectangle2D | |
| public int | |
| public Rectangle2D | |
| public String | |
| public String | |
| public int |
| marker | back to summary |
|---|---|
| private final Rectangle2D marker | |
| pageNumber | back to summary |
|---|---|
| private final int pageNumber | |
| searchText | back to summary |
|---|---|
| private final String searchText | |
| textSnippet | back to summary |
|---|---|
| private final String textSnippet | |
| SearchResult | back to summary |
|---|---|
| public SearchResult(String searchText, String textSnippet, int pageNumber, Rectangle2D marker) Constructs a new search result.
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(PDFView. Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getMarker | back to summary |
|---|---|
| public Rectangle2D getMarker() | |
| getPageNumber | back to summary |
|---|---|
| public int getPageNumber() | |
| getScaledMarker | back to summary |
|---|---|
| public Rectangle2D getScaledMarker(double scale) | |
| getSearchText | back to summary |
|---|---|
| public String getSearchText() | |
| getTextSnippet | back to summary |
|---|---|
| public String getTextSnippet() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |