Below, please find the release notes for VirtualViewer v4.13. For questions, please contact us at info@accusoft.com or by phone at (617) 607-2010.

New Features

Save Default Choices for Document Dialogs

Users may now save custom default choices for the Save As, Export, Copy to New, Cut to New, Print, and Email dialogs.

For instance, a user’s workflow may demand that all documents be exported as TIFFs. Previously, the user would have to find the Format section in the Export dialog and click the TIFF radio button for every export.

Now, the user can fill out the dialog with their preferred default choices and then click the button labeled Save Preferences in the bottom left of the dialog. When the user opens the Export dialog again, the form will be filled out with their saved defaults.

How to Use

To use this new feature, a user modifies the form choices in a dialog and saves those choices as the new default. For instance, they may choose to set defaults in the print dialog. The user opens the print dialog, and chooses the options to use going forward.

Clicking the Save Preferences button will save the user’s choices. The dialog will still open normally, and the user may still change options normally. The options that are selected immediately on opening the dialog will now be the user’s custom defaults.

Technical Details

Data will be stored in the browser’s local storage, through the localforage library, so the preferences will persist across sessions of VirtualViewer on the same browser. Radio buttons and checkboxes will be stored; free text fields and page range fields will not have any defaults stored.

New Configuration Options

No configuration is necessary to enable this feature, but there are new configuration options to pre-set certain dialog defaults.

  • vvConfig.includeRedactions The “Burn Redactions (Permanent)” checkbox will burn redactions into an image. If this configuration item is true, “Burn Redactions (Permanent)” will be checked by default.

  • vvConfig.includeRedactionTags The “Include Redaction Tags” checkbox will write redaction tags onto the redactions on an image. If this configuration item is true, “Include Redaction Tags” will be checked by default.

  • vvConfig.includeDocumentNotes The “Include Document Notes” checkbox will include the document notes in the exported, saved, printed, or copied document. If this configuration item is true, “Include Document Notes” will be checked by default.

  • vvConfig.includeWatermarks The “Include Watermarks” checkbox will include added watermarks in the exported, saved, printed, or copied document. If this configuration item is true, “Include Watermarks” will be checked by default.

VirtualViewer now supports document searches and OCR on Virtual Documents, Sparse Documents, and compound documents. Search will also return correct results on documents whose pages have been manipulated and that have not yet been saved; previously, it would use the server version of a document, so could return results for a deleted page.

Pattern search is now supported on annotations. VirtualViewer may search annotation text, tags, and notes for social security numbers, telephone numbers, credit card numbers, and email addresses.

The user interface of the search tab has been updated with new button images, styles, and an adjusted layout.

The search API remains largely the same, with a new addition:

Unchanged API:

  • virtualViewer.cancelCurrentSearch() stops the current search, and displays any already-returned results.

  • virtualViewer.clearSearchResults() clears the current search, removing highlights from the document and thumbnails from the search panel.

  • virtualViewer.nextSearchResult() advances the currently selected search result, switching pages if necessary.

  • virtualViewer.previousSearchResult() moves the currently selected search result to the previous match, switching pages if necessary.

  • virtualViewer.isDocumentSearchable() returns true if the document is searchable. It returns false if the document is not searchable

  • virtualViewer.searchText(searchTerm, firstPage, lastPage, skipOcrPrompt) launches a search through the current document’s text for the given search term. This search is performed on the server, and may perform OCR if the document has no text, OCR is enabled, and the user consents. A progress bar will appear when search is launched, as document search is performed asynchronously and in batches: a small batch of pages will be searched and a new batch sent to the server when the previous batch is returned.

    • searchTerm {String} The word or words to search for. Set case sensitivity in your configuration file.
    • firstPage {Number} Optionally define the start of a region of the document to search. This is 0-indexed, and the default is 0.
    • lastPage {Number} Optionally define the end of a region of the document to search. This is a 0-indexed, non-inclusive value. The default is the length of the document.
    • skipOcrPrompt {Boolean} If this parameter is set, document search will not prompt the user before using OCR, but will go ahead and use it if necessary and if OCR is enabled.
    • returns undefined

New API:

  • virtualViewer.searchAnnotationText(searchTerm) launches a search through every annotation on the current document for the given search term. Searched annotation text includes annotation notes, text content, and tags. If no search term is provided and there is a search pattern currently selected in the search tab, a pattern search through the annotations will be launched.
    • searchTerm {String} The word or words to search for. Annotation search is case-insensitive.
    • Returns undefined

Two new configuration parameters allow color customization for search. When a search is completed, all search results are highlighted in an orange color on the document; the current search result in focus is highlighted a light yellow.

The first option, vvConfig.searchColors.matchColor, sets the color for highlighting search results that are not in focus. The second, vvConfig.searchColors.selectedMatchColor, sets the color for highlighting the in-focus search result.

Both configurations may be set to a string that contains an rgba color, in the format "rgba(255,78,0,0.2)". This is the default color for search-result highlights. The first three numbers are RGB values to establish the color, and the fourth number is an alpha value–treated like a percent–to define the transparency of the highlight.

New Callbacks

New callbacks have been provided to allow custom code to interact with VirtualViewer. In order to set a callback, call virtualViewer.setCallback("callbackName", callbackFunction). This function returns true if the callback was set correctly, and false if it was not. The callback function should be defined, and should take a single argument object as a parameter. Then, for instance, if the function is declared as function foo(args) { ... }, the arguments are accessible in the callback function as args.firstArgument.

VirtualViewer is responsible for calling the provided callback function appropriately. For instance, VirtualViewer will attempt to call the function set to the "switchToTab" callback whenever a user switches their tab. Most callbacks do not pay attention to return values, but two new callbacks require a boolean return.

  • annotationChanged is called whenever the user modifies an annotation; this will fire whenever VirtualViewer itself judges that an annotation has been changed and the asterisk appears in the tab name. The following parameters will be provided to the callback in the argument object:
    • documentId {String} The ID of the current document whose annotations have been modified
    • annotationLayerId {String} The ID of the layer that holds the modified annotation
    • annotationId {String} The ID of the modified annotation
  • disableTextContextMenu is called when the text context menu is about to appear, and if the callback function returns true, the context menu will be disabled. This context menu can contain options to copy and cut text if any is selected on the document, to perform OCR, or to close document compare. The callback function will be provided one parameter in the arguments object, and must return a value:
    • documentId {String} The ID of the current document that the user is clicking on
    • Return true to disable the context menu, and return false to allow the context menu to show as normal
  • disablePageManipulationContextMenuOptions is called when the page thumbnail context menu is shown. If the callback function returns true, page manipulation options will be removed from the context menu. Page manipulation options include cut, copy, and delete options; page insertion options; and page selection options. This function is equivalent to setting the configuration option vvConfig.pageManipulations, but allows document-by-document granular control. The callback function will be provided one parameter in the arguments object, and must return a value:
    • documentId {String} The ID of the current document whose pages the user is clicking on
    • Return true to remove the page manipulation options, and return false to allow VirtualViewer to show or hide the options as normal

Configuration to Disable User Preferences

Now, an administrator can completely disable User Preferences through a new option in vvConfig, vvConfig.disableUserPreferences. This configuration item can be set to true or false. If true, the User Preferences dialog will be unavailable to users. All configuration items that could be overridden in User Preferences will be drawn from vvConfig; users will not be able to override vvConfig settings. If not set or set to false, User Preferences will behave as normal.

Dynamic Debug Logging

To assist in debugging issues logging can now be toggled into a debug mode without having to change configuration files. Turning on dynamic logging can be done with the client-side call virtualViewer.loggingOverride(true) - while this flag is set all requests during that session will log all messages as high priority. This allows finely detailed logs to be created for a specific use case without changing global log configurations.

Simple Logging Facade (Java)

VirtualViewer Java now implements SLF4J (Simple Logging Facade for Java), a logging abstraction that allows clients to plug in the logging system of their choice. Documentation and examples can be found at https://www.slf4j.org/docs.html.

The default logger is still the java.util.logging framework. The init-param logLevel will only function for the default java.util.logging framework - if another logging framework is plugged in using SLF4J, that logging framework’s configuration should be used instead.

Common Logging Facade (NET)

VirtualViewer NET now implements Common.Logging.NET, a logging abstraction that allows clients to plug in the logging system of their choice. Documentation and examples can be found at http://net-commons.github.io/common-logging/.

The default logging functionality is unchanged and is implemented in Common.Logging’s configuration as SnowboundLoggerFactoryAdapter. The web.config parameters logLevel and logToIIS are also now implemented as arguments in Common.Logging’s web.config section, although the original InitParam arguments will still work for the default logger. If another logging framework is plugged in using Common.Logging, that logging framework’s configuration should be used instead - logLevel and logToIIS will only affect the default logger.

Fixes and Changes

Sticky note updates

The double-arrow button to minimize sticky notes will now scale with zoom. Previously, it was possible for the button to be drawn outside the bounds of the sticky note. Now, the button will no longer be larger than the area of the sticky note, and will disappear when the sticky note is zoomed out far enough.

Previously, on a zoomed-out document, it was possible for the size of a minimized sticky note to be larger than the full sticky note. Now, the minimized sticky note will scale properly as the document zooms.

enableOcr configuration fixed

The enableOcr configuration works again and now defaults to “true” (which will have no effect if your VirtualViewer license doesn’t support OCR). Setting enableOcr to “false” will disable OCR even if your VirtualViewer license supports it. enableOcr was disabled in 4.12 and replaced with a simple license feature check for OCR.

PDF signature printing issue

Some PDFs have an issue with signatures disappearing when printing via VirtualViewer. We’ve modified our PDF.js printing solution to fix this issue. If you are encountering this problem, change config.js’s disableDirectPDFPrinting to “true” to use our modified PDF.js instead of your browser’s.

Misc. Fixes/Changes:

  • Fixed issue with inserting annotations + disappearing layers
  • Fixed client stack trace in sendDocument
  • Added new config parameter, ‘consolidateLayerName’ to set the default name of a consolidation layer
  • Prevent context menus from drawing off-screen when at the boundaries of the viewer
  • Fixed document tab showing changes (with an Asterisk) when none were made
  • Fixed bookmarks being lost during page manipulations