VirtualViewer® HTML 5 v5.2 Release Notes
New APIs to Adjust Brightness, Contrast, and Gamma on Multiple Pages
Users can now adjust Brightness, Contrast and Gamma for a specified set of pages. The added APIs are:
- Brightness
adjustBrightnessForSelectedPages
is called to increase or decrease brightness for a set of pages. If the final value for brightness is above 125, the brightness will be set at 125. Conversely, if the final value for brightness is below -125, the brightness will be set at -125.pageNumberArray
{array} an array of the page numbers to adjust brightness foradjustValue
{number} a positive number to increase brightness or a negative number to decrease brightness
increaseBrightnessForSelectedPages
can be called when the user wants to increase brightness for a set of pages. If the final value for brightness is above 125, the brightness will be set at 125.pageNumberArray
{array} an array of the page numbers to increase brightness forvalue
{number} the value to increase brightness by
decreaseBrightnessForSelectedPages
can be called when the user wants to decrease brightness for a set of pages. If the final value for brightness is below -125, the brightness will be set at -125.pageNumberArray
{array} an array of the page numbers to decrease brightness forvalue
{number} the value to decrease brightness by
- Contrast
adjustContrastForSelectedPages
is called to increase or decrease contrast for a set of pages. If the final value for contrast is above 125, the contrast will be set at 125. Conversely, if the final value for contrast is below -125, the contrast will be set at -125.pageNumberArray
{array} an array of the page numbers to adjust contrast foradjustValue
{number} a positive number to increase contrast or a negative number to decrease contrast
increaseContrastForSelectedPages
can be called when the user wants to increase contrast for a set of pages. If the final value for contrast is above 125, the contrast will be set at 125.pageNumberArray
{array} an array of the page numbers to increase contrast forvalue
{number} the value to increase contrast by
decreaseContrastForSelectedPages
can be called when the user wants to decrease contrast for a set of pages. If the final value for contrast is below -125, the contrast will be set at -125.pageNumberArray
{array} an array of the page numbers to decrease contrast forvalue
{number} the value to decrease contrast by
- Gamma
adjustGammaForSelectedPages
is called to increase or decrease gamma for a set of pages. If the final value for gamma is above 400, the contrast will be set at 400. Conversely, if the final value for contrast is below 0, the contrast will be set at 0.pageNumberArray
{array} an array of the page numbers to adjust gamma foradjustValue
{number} a positive number to increase gamma or a negative number to decrease gamma
increaseGammaForSelectedPages
can be called when the user wants to increase gamma for a set of pages. If the final value for gamma is above 400, the gamma will be set at 400.pageNumberArray
{array} an array of the page numbers to increase gamma forvalue
{number} the value to increase gamma by
decreaseGammaForSelectedPages
can be called when the user wants to decrease gamma for a set of pages. If the final value for gamma is below 0, the contrast will be set at 0.pageNumberArray
{array} an array of the page numbers to decrease gamma forvalue
{number} the value to decrease gamma by
Error Modal Configuration
A new configuration item allows administrators to supress error modals displaying in the viewer when an error occurs. Additionally, errors are now always logged in the browser console as errors. This logging cannot be disabled. The log message will provide all of the error information that is available. It is recommended to replace a disabled error modal with some signal to the user that an error has occurred.
The new error configuration item is an object in user-config/config.js
, with several attributes that allow granular control of error modals. If an attribute is set to true
, the corresponding modals will be disabled. The object is as follows:
-
disableErrorModals
This is an object that stores many booleans, each one related to a set of error modals. If an attribute in this object is set totrue
, modals will not appear if an error occurs; the error will be logged in the console, but the user will not see the modal. Note that the first two attributes,server
andclient
, will disable a large number of modals and should be used carefully.server
{boolean} Disable all modals originating from the server. If a server call returns an error, or fails, no error modal will be displayed.client
{boolean} Disable all modals originating from the client.adminDisabled
{boolean} If a user attempts an action that has been disabled by an administrator–for example, uploading a document–an error modal alerts them that the action has failed. This option disables modals telling the user that an action is not allowed.annotations
{boolean} Disable all error modals originating from annotation layer manipulation.bookmark
{boolean} Disable all error modals originating from bookmarks. For example, an error modal would appear if a user attempts to edit a nonexistent bookmark.cropBlock
{boolean} Disable all error modals that appear if a user attempts to annotate a cropped page.documentNotFound
{boolean} Disable the error modal reporting that a document was not found in the document list. Note that this is both a client and a server error. If a document was not found by the content handler, that error modal is controlled by theserver
option; otherwise it is controlled by theclient
option.export
{boolean} Disable modals telling the user that an export operation failed.IEImageLoadError
{boolean} There is an error case when Internet Explorer fails to load an image after several fallback actions have been taken by VirtualViewer. This option disables the modal telling the user that Internet Explorer has failed to load an image in this case.imageFailedToLoad
{boolean} After an image fails to load after several retries and fallbacks, VirtualViewer will display an error to the user reporting the failure. This option disables that error modal.media
{boolean} Disable all modals originating from video and audio playback errors.pageLimit
{boolean} Disable all error modals alerting the user that a document must contain at least one page.pageManipulation
{boolean} Disable all error modals originating from cutting, copying, or pasting document pages.print
{boolean} Disable all error modals originating from VirtualViewer printing. This will not affect errors from the system print dialog.splitScreen
{boolean} Disable all error modals that report why document comparison has failed to initiate.tabs
{boolean} Disable all modals describing errors with document tabs: for example, if there are too many tabs open, or if an API call attempts to close a tab that does not exist.xlsxPageLimited
{boolean} A server option allows administrators to limit how many pages of an XLSX document will be rendered and provided to the user. This setting may be used for memory management on the server. If an XLSX document has rendered only a subset of its pages, the user will see an alert. This option disables that alert. It is important to alert the user that they are not seeing the complete XLSX document. It is highly recommended to preserve this modal, or to provide a replacement alert if this is disabled.
Additional Configuration for Responsive Toolbars
VirtualViewer uses responsive toolbars to ensure that buttons are never hidden or cut off when viewing the application on a small screen, such as a phone or small iframe. If toolbar buttons are about to overflow the screen real estate, the buttons will collapse into several dropdown menus. When the screen is very small and even the dropdown menus would be hidden, toolbar buttons are collapsed into a single list, accessible by clicking the three horizontal lines on the top-left of the screen (the “hamburger” button).
A new configuration item, disableToolbarHamburger
, will restrict VirtualViewer from entering the mode where all toolbar buttons are accessible through the hamburger button. When disableToolbarHamburger is set to true
, the viewer will never enter the hamburger toolbar state. This may cause toolbar buttons to be hidden, cut-off, and inaccessible by the user at lower resolutions and smaller screen sizes. If users never use mobile hardware, then this may improve UI concerns. When disableToolbarHamburger
is not set, or set to false, the viewer will continue to shrink the toolbar at small sizes.
Additionally, the threshold for hamburger mode has been reduced. VirtualViewer tests the width of the screen, and if it is small enough, shrinks the toolbar into hamburger mode. This threshold of “small enough” has been lowered, so that the viewer will shrink the toolbar at smaller screen sizes than previously.
Configuration
To disable the hamburger menu, set the parameter disableToolbarHamburger
in user-config/config.js
to true
.
Read-Only Annotation Mode
A new configuration item prevents users from adding, modifying, or deleting annotations. When VirtualViewer is in read-only annotation mode, annotation functionality is restricted in the following ways:
- New annotations cannot be created
- Previously created annotations cannot be edited using the annotation pop-up menu
- Previously created annotations cannot be moved
- Previously created annotations cannot be copied, cut, or pasted
Users may still choose whether to include annotations when saving a document as, and when exporting, emailing, or printing a document. Please note that when in read-only annotation mode, crop works normally. Therefore, if you crop a page in read-only annotation mode, the cropped image will not have any annotations on it.
Configuration
To turn read-only annotation mode on, set the parameter readOnlyAnnotationMode
in config.js
to true
.
Fast Raster-to-PDF Export
A new configuration allows some raster image files (such as JPG, PNG and some TIFFs) to be exported to PDF much faster. This will be most noticeable when exporting a document with multiple raster pages by way of a virtual or compound document.
Please note that this configuration will also drastically increase the exported PDF’s file size. The exported PDF will be about as large as all of the component images’ file sizes added together.
Configuration
To enable fast raster assembly, set the parameter fastRasterToPDFAssembly
in web.xml
to true
. To
New Callbacks
Several new callbacks have been added to toolbar actions. In general, callbacks named “actionBegin” will fire once an action–like Save As–has been initiated and validated; callbacks named “actionError” will fire if the action encounters an error after that; and callbacks simply called “action” will fire on the success of the action.
Note that an action will only begin, and the “begin” callback will only be called, if the action has been validated–so, for instance, if printDocument
is called when there’s no document open, the action would fail validation and the callbacks would not fire.
saveDocumentBegin
will be called when the viewer has validated and initiated the saving process. It will be called before any server calls are made. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the document to be saved.clientInstanceId
{String} The clientInstanceId that will be passed to the server in the save document call.
saveAsDocumentBegin
will be called when a document when the viewer has validated and initiated the Save As process. It will be called before any server calls are made. The following parameters will be provided to the callback in the argument object:documentId
{String} The original ID of the document to be saved.newDocumentId
{String} The ID of the new document to be generated by Save As.clientInstanceId
{String} The clientInstanceId that will be passed to the server in the Save As call.
saveAsDocumentError
will be called if an error occurs while saving a document, as a way to retrieve more detailed error information than would be displayed to the user. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the current document. This is the document that was attempting to Save As.saveAsDocumentId
{String} The ID of the new document that was supposed to be generated by Save As is provided here.exceptionMessage
{String} One of the avenues for an error message. A message may be provided here if the server caught the problem during save.statusText
{String} The other avenue for the error message. This may be HTTP status information, most helpful if the viewer did not catch the problem during save.
uploadDocumentBegin
will be called when the Upload Document process has been validated and initiated on the client. This will be called before any server calls. The following parameters will be provided to the callback in the argument object:filename
{String} The file name of the document that will be uploaded.clientInstanceId
{String} The clientInstanceId that will be passed to the server in the upload call.
uploadDocumentError
will be called if the server encounters an error while attempting to upload a document. The following parameters will be provided to the callback in the argument object:filename
{String} The file name of the document that failed to upload.clientInstanceId
{String} The clientInstanceId passed to the server in the upload call.exceptionMessage
{String} An error message provided by the VirtualViewer server.statusText
{String} Status text from the response to the upload request.
exportDocumentBegin
will be called when the Export Document process has been validated and initiated on the client. This will be called before any server calls. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the document to be exported.format
{String} The format that the document will be exported as. This will be “PDF”, “TIFF”, or “Original”.includeAnnotations
{boolean} Whether annotations will be included in (burned into) the exported document.includeRedactions
{boolean} Whether redactions will be included in (burned into) the exported document.includeRedactionTags
{boolean} If redactions are included, whether text tags will be placed on the redactions.includeDocumentNotes
{boolean} Whether document notes will be included as pages at the end of the document.includeWatermarks
{boolean} Whether the exported document will include watermarks.pageRangeType
{String} A string that, when paired with the param pageRangeValue, represents what pages will be exported. Values are “all”, “current”, and “complex”.pageRangeValue
{String} The pages to export. For pageRangeType “all”, this will be undefined. For “current” and “complex” this will hold a page number or string representing a set of page numbers.filename
{String} The preferred filename for the exported document.clientInstanceId
{String} The clientInstanceId to be sent to the server.
exportDocumentError
will be called if the Export Document process has failed. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the document to be exported.format
{String} The format that the document was exported as. This will be “PDF”, “TIFF”, or “Original”.includeAnnotations
{boolean} Whether annotations were included in (burned into) the exported document.includeRedactions
{boolean} Whether redactions were included in (burned into) the exported document.includeRedactionTags
{boolean} If redactions were included, whether text tags were placed on the redactions.includeDocumentNotes
{boolean} Whether document notes were included as pages at the end of the document.includeWatermarks
{boolean} Whether the exported document included watermarks.pageRangeType
{String} A string that, when paired with the param pageRangeValue, represents what pages were exported. Values are “all”, “current”, and “complex”.pageRangeValue
{String} The pages to export. For pageRangeType “all”, this will be undefined. For “current” and “complex” this will hold a page number or string representing a set of page numbers.filename
{String} The preferred filename for the exported document.clientInstanceId
{String} The clientInstanceId sent to the server.exceptionMessage
{String} An exception message, either one returned from the server or one noting a JSON parse error.
emailDocumentBegin
will be called when the Email Document process has been validated and initiated on the client. This will be called before any server calls. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the document to be emailed.format
{String} The format that the document will be emailed as. This will be “PDF”, “TIFF”, or “Original”.includeAnnotations
{boolean} Whether annotations will be included in (burned into) the emailed document.includeRedactions
{boolean} Whether redactions will be included in (burned into) the emailed document.includeRedactionTags
{boolean} If redactions are included, whether text tags will be placed on the redactions.includeDocumentNotes
{boolean} Whether document notes will be included as pages at the end of the document.includeWatermarks
{boolean} Whether the exported document will include watermarks.pageRangeType
{String} A string that, when paired with the param pageRangeValue, represents what pages will be emailed. Values are “all”, “current”, and “complex”.pageRangeValue
{String} The pages to email. For pageRangeType “all”, this will be undefined. For “current” and “complex” this will hold a page number or string representing a set of page numbers.clientInstanceId
{String} The clientInstanceId to be sent to the server.fromAddress
{String} The email address in the ‘from’ field of the email.toAddresses
{String} A comma-delimited list of email addresses in the ‘to’ field of the email.ccAddresses
{String} A comma-delimited list of email addresses in the ‘CC’ field of the email.bccAddresses
{String} A comma-delimited list of email addresses in the ‘BCC’ field of the email.subject
{String} The subject line of the email.emailBody
{String} The body text of the email, if any.
emailDocument
will be called when the server has returned successfully from the email document process. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the emailed document.format
{String} The format that the document was emailed as. This will be “PDF”, “TIFF”, or “Original”.includeAnnotations
{boolean} Whether annotations were included in (burned into) the emailed document.includeRedactions
{boolean} Whether redactions were included in (burned into) the emailed document.includeRedactionTags
{boolean} If redactions were included, whether text tags were placed on the redactions.includeDocumentNotes
{boolean} Whether document notes were included as pages at the end of the document.includeWatermarks
{boolean} Whether the emailed document included watermarks.pageRangeType
{String} A string that, when paired with the param pageRangeValue, represents what pages were emailed. Values are “all”, “current”, and “complex”.pageRangeValue
{String} The pages emailed. For pageRangeType “all”, this will be undefined. For “current” and “complex” this will hold a page number or string representing a set of page numbers.clientInstanceId
{String} The clientInstanceId to be sent to the server.fromAddress
{String} The email address in the ‘from’ field of the email.toAddresses
{String} A comma-delimited list of email addresses in the ‘to’ field of the email.ccAddresses
{String} A comma-delimited list of email addresses in the ‘CC’ field of the email.bccAddresses
{String} A comma-delimited list of email addresses in the ‘BCC’ field of the email.subject
{String} The subject line of the email.emailBody
{String} The body text of the email, if any.
emailDocumentError
will be called if the server has encountered an error in the email document process. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the emailed document.format
{String} The format that the document was emailed as. This will be “PDF”, “TIFF”, or “Original”.includeAnnotations
{boolean} Whether annotations were included in (burned into) the emailed document.includeRedactions
{boolean} Whether redactions were included in (burned into) the emailed document.includeRedactionTags
{boolean} If redactions were included, whether text tags were placed on the redactions.includeDocumentNotes
{boolean} Whether document notes were included as pages at the end of the document.includeWatermarks
{boolean} Whether the emailed document included watermarks.pageRangeType
{String} A string that, when paired with the param pageRangeValue, represents what pages were emailed. Values are “all”, “current”, and “complex”.pageRangeValue
{String} The pages emailed. For pageRangeType “all”, this will be undefined. For “current” and “complex” this will hold a page number or string representing a set of page numbers.clientInstanceId
{String} The clientInstanceId to be sent to the server.fromAddress
{String} The email address in the ‘from’ field of the email.toAddresses
{String} A comma-delimited list of email addresses in the ‘to’ field of the email.ccAddresses
{String} A comma-delimited list of email addresses in the ‘CC’ field of the email.bccAddresses
{String} A comma-delimited list of email addresses in the ‘BCC’ field of the email.subject
{String} The subject line of the email.emailBody
{String} The body text of the email, if any.exceptionMessage
{String} An error message provided by the VirtualViewer server.statusText
{String} Status text from the response to the email request.
printDocumentBegin
will be called when the Print Document process has been validated and initiated on the client. This will be called before any server calls. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the document to be printed.includeAnnotations
{boolean} Whether annotations will be included in (burned into) the printed document.includeRedactions
{boolean} Whether redactions will be included in (burned into) the printed document.includeRedactionTags
{boolean} If redactions are included, whether text tags will be placed on the redactions.includeDocumentNotes
{boolean} Whether document notes will be included as pages at the end of the document.includeWatermarks
{boolean} Whether the printed document will include watermarks.pageRangeType
{String} A string that, when paired with the param pageRangeValue, represents what pages will be printed. Values are “all”, “current”, and “complex”.pageRangeValue
{String} The pages to print. For pageRangeType “all”, this will be undefined. For “current” and “complex” this will hold a page number or string representing a set of page numbers.clientInstanceId
{String} The clientInstanceId to be sent to the server.
printDocument
will be called when a document prints successfully. Essentially, VirtualViewer’s role is to publish the document so the browser can handle printing from that point forward. This callback is called when VirtualViewer’s role is complete and the viewer sees the system print dialog. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the printed document.totalPages
{number} The total pages printed, if available.
printDocumentError
will be called when a document encounters an error while printing. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the printed document.exceptionMessage
{String} A brief description of the error.
zoomDocumentBegin
will be called when a zoom action is initiated and validated. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the zoomed document.currentZoom
{number} The current percent zoom of the document–eg 50 for a 50% zoom.newZoom
{number} The proposed new percent zoom of the document.
zoomDocument
will be called when a zoom action is completed. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the zoomed document.currentZoom
{number} The current percent zoom of the document–eg 50 for a 50% zoom.
zoomDocumentError
will be called if the zoom action encounters a handled error, for example if the zoom action would zoom in more than the maximum allowed zoom percent. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the zoomed document.currentZoom
{number} The current percent zoom of the document–eg 50 for a 50% zoom.newZoom
{number} The proposed new percent zoom of the document.exceptionMessage
{String} A brief description of the error encountered.
zoomRubberbandBegin
will be called when a user begins drawing a rubberband zoom box on the document. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the zoomed document.currentZoom
{number} The current percent zoom of the document–eg 50 for a 50% zoom.
zoomRubberband
will be called when a user finishes drawing the box for Rubberband Zoom, and the document is correctly zoomed and scrolled. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the zoomed document.currentZoom
{number} The current percent zoom of the document–eg 50 for a 50% zoom.
zoomRubberbandError
will be called if Rubberband Zoom encounters an error. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the zoomed document.currentZoom
{number} The current percent zoom of the document–eg 50 for a 50% zoom.newZoom
{number} The proposed new percent zoom of the document.exceptionMessage
{String} A brief description of the error encountered.
magnifierBegin
will be called before the magnifier is toggled. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the currently active document.currentPage
{number} The current page of the document.magnifierActive
{boolean} Whether the magnifier is currently active.
magnifier
will be called when the magnifier is toggled. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the currently active document.currentPage
{number} The current page of the document.magnifierActive
{boolean} Whether the magnifier is currently active.
fitDocumentBegin
will be called when a Fit To action is initiated and validated–Fit to Width, Fit to Height, or Fit to Window. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the zoomed document.currentZoom
{number} The current percent zoom of the document–eg 50 for a 50% zoom.newFitMode
{number} The requested fit mode. This value is an enum defined inzoomModes:vvDefines.js
.
fitDocument
will be called when a Fit To action (Fit to Width, Fit to Height, or Fit to Window) is complete. The following parameters will be provided to the callback in the argument object:documentId
{String} The ID of the zoomed document.currentZoom
{number} The current percent zoom of the document–eg 50 for a 50% zoom.
pageChangeBegin
will be called immediately before the current page of an open document changes. The following parameters will be provided to the callback in the argument object:documentId
{String} The current document’s ID.currentPage
{number} The current page of the document.newPage
{number} The new page that the viewer is attempting to change to.
pageChangeError
will be called if the viewer encounters an error while attempting to change a document’s page. The following parameters will be provided to the callback in the argument object:documentId
{String} The current document’s ID.currentPage
{number} The current page of the document.newPage
{number} The new page that the viewer is attempting to change to.exceptionMessage
{String} A brief description of the error encountered.
rotationBegin
will be called before a page is rotated. Pages can be rotated to 0, 90, 180, and 270 degrees. When freshly loaded from the server, a page always starts at 0 degrees rotation, even if it was rotated in a previous VirtualViewer session. The following parameters will be provided to the callback in the argument object:documentId
{String} The current document’s ID.page
{number} The 0-based index of the page to be rotated.rotationAngle
{number} The current angle, in degrees, of the page to be rotated. If the document is freshly loaded from the server, the angle will be 0, even if the page appears rotated.
rotationError
will be called if page rotation encounters an error. The following parameters will be provided to the callback in the argument object:documentId
{String} The current document’s ID.page
{number} The 0-based index of the page to be rotated.rotationAngle
{number} The current angle, in degrees, of the page to be rotated. If the document is freshly loaded from the server, the angle will be 0, even if the page appears rotated.exceptionMessage
{String} A brief description of the error encountered.
cropDocumentBegin
will be called when a user begins drawing a crop rectangle on the document. The following parameters will be provided to the callback in the argument object:documentId
{String} The current document’s ID.page
{number} The 0-based index of the page to be cropped.
cropDocumentError
will be called if the crop document action encounters an error. The following parameters will be provided to the callback in the argument object:documentId
{String} The current document’s ID.page
{number} The 0-based index of the page to be cropped.exceptionMessage
{String} A brief description of the error encountered.
cropDocument
will be called when a user crops a page successfully. The following parameters will be provided to the callback in the argument object:documentId
{String} The current document’s ID.page
{number} The 0-based index of the cropped page.
invertImageBegin
will be called when the invertImage action begins. The completion of this action is noted by the callback imageManipulation. The following parameters will be provided to the callback in the argument object:documentId
{String} The current document whose page will be inverted.page
{number} The page number of the inverted page.currentImageInverted
{boolean} The current image inversion status. A value of true indicates that the image is inverted.invertImage
{boolean} The requested image inversion status.
brightnessAdjustBegin
will be called when the brightness of a page is set. The completion of this action is noted by the callback imageManipulation. Note that this callback may be called multiple times as a user adjusts a slider in Picture Controls, and again if the user cancels out of Picture Controls, to reverse the adjustments back to default. The following parameters will be provided to the callback in the argument object:documentId
{String} The current document whose page will be adjusted.page
{number} The page number of the adjusted page.currentBrightness
{number} The current brightness value of the page.requestedBrightness
{number} The requested brightness value.
gammaAdjustBegin
will be called when the gamma value of a page is set. The completion of this action is noted by the callback imageManipulation. Note that this callback may be called multiple times as a user adjusts a slider in Picture Controls, and again if the user cancels out of Picture Controls, to reverse the adjustments back to default. The following parameters will be provided to the callback in the argument object:documentId
{String} The current document whose page will be adjusted.page
{number} The page number of the adjusted page.currentGamma
{number} The current gamma value of the page.requestedGamma
{number} The requested gamma value.
contrastAdjustBegin
will be called when the contrast of a page is set. The completion of this action is noted by the callback imageManipulation. Note that this callback may be called multiple times as a user adjusts a slider in Picture Controls, and again if the user cancels out of Picture Controls, to reverse the adjustments back to default. The following parameters will be provided to the callback in the argument object:documentId
{String} The current document whose page will be adjusted.page
{number} The page number of the adjusted page.currentContrast
{number} The current contrast value of the page.requestedContrast
{number} The requested contrast value.
imageManipulation
will be called when image manipulation is complete. Image manipulation includes adjustment of brightness, gamma, and contrast values in Picture Controls, and setting image inversion through the invertImage API. This callback covers completion of all of these actions. The following parameters will be provided to the callback in the argument object:documentId
{String} The current document whose page has been manipulated.page
{number} The page number of the manipulated page.gamma
{number} The gamma value of the image.brightness
{number} The brightness value of the image.contrast
{number} The contrast value of the image.invert
{boolean} Whether the image is inverted.
Fixes and Changes
Improve How a Document Is Marked Modified
When annotations were simply clicked on, the document was marked as modified. Now, the annotation must have an actual change made to it for the document to be marked as modified. In addition to this, if an annotation is created and then deleted in the same session before the document is saved, the document will not be marked as modified.
Sticky Note Annotations
As sticky note annotations became smaller when zoomed out, it became more difficult to interact with the annotation. Sticky notes could not be moved fluidly around the page, and they could not be collapsed or un-collapsed when very small. Now, these issues are fixed. The sticky notes may be moved. When the collapse arrows are visible, the sticky note will correctly collapse or un-collapse. When the sticky note is very small, no collapse arrows will be shown, as the click target would be only a few pixels wide.
Miscellaneous
- Annotation comments are editable on double-click
- Improved keyboard navigation and screenreader interaction with toolbars
- Display names passed into the API
virtualViewer.openSpecifiedDocuments
are used by the viewer - Fixed an issue with how VirtualViewer handles page-loading errors on Internet Explorer
- An error no longer appears when dragging and dropping bookmarked pages
- Changing brightness, contrast, and gamma on Edge no longer sporadically causes a page to fail to load
- Pasting pages into a document will preserve all watermarks on the pasted pages
- An error no longer appears when disabling User Preferences
Have questions, corrections, or concerns about this topic? Please let us know!