WebRenderer Swing Edition 6.0 beta #6 has officially shipped. With this latest beta we have included a few new important features including print preview, improvements to overall printing and a new set of API methods for high performance Text Searching and Highlighting geared for large web documents.
The new high performance Textual Search API has been added to WebRenderer at the request of one of our clients. This API significantly expands on the Textual Search capabilities of WebRenderer. This is especially evident when searching and highlighting multiple terms in large documents. This feature is particularly applicable to any web-enabled document review application that makes use of “Find”, and “Find and Highlight” features. Although this may seem trivial, the implementation took quite some time and many client-review iterations to perfect. Getting the speed and optimal performance out of textual search and highlighting is a lot more complicated than one would expect. The complications come via searching large web pages/documents (3mb+) and highlighting more than a single term across multiple HTML nodes (such as partially bolded text). We have also added the ability to Cancel text searching mid-search, and remove all search highlighting.
The features at a glance:
- Parallel searching (multiple terms race each-other in highlighting text)
- Finds search terms split across document Nodes (such as partially bolded text)
- Runs in background and does not lock-up the User Interface whist searching
- Multi-colored search highlights
The API is as follows;
// IFindService added - can be called multiple times for concurrent searches
IFindService findService = (IMozillaBrowserCanvas)browser.getFindService();
// Actions on the IFindService
findAndHighlight(String text, Color color);
findAndHighlight(String text, Color color, FindFlag[] flags);
cancelAllSearches();
clearAllMatches();
nextMatch();
previousMatch();
An example demonstrating the Text Search and Highlight functionality is available (TextHighlightExample.java) here..
Additionally in beta 6 improvements have been made to the internal printing code within WebRenderer. This results in improved printing of pages that are consistent with how the page is rendered on screen. We have also added a new Print Preview feature which includes support for displaying the preview within the browser window or externally as a popup window. Overall rendering quality of print preview is consistent with the base rendering of the page. This is good news as for quite some time print-preview left a lot to be desired in terms of page rendering consistency. The print layout in previous versions really messed with the overall UI. Consistency is good and the new Print Preview is a worthy addition to the Swing Edition 6.0.
browser.printPreview(); // Shows in parent window
browser.printPreviewInNewWindow(); // Shows in popup window
|