Technical FAQs

Question

I’m receiving the error “Uncaught TypeError: Cannot read property ‘viewer’ of undefined” when trying to embed the PrizmDoc Viewer in my web application. What could be the issue?

Answer

This indicates that the template property in the viewer initialization has not been specified or is undefined.

To fix this, ensure you are loading viewerCustomizations.js.

If the version you are working with predates viewerCustomizations.js, you can get a copy of viewerCustomizations.js from the viewer assets, hosted here, and update your viewer initialization code.

On June 25, 2021, Accusoft announced the latest update to PrizmDoc Viewer, its industry-leading HTML5 document viewing and image processing integration. The version 13.17 update improves a number of existing features and adds key functionality, allowing developers to offer even more versatility within their applications.

“Staying still is never an option,” says Mark Fears, Director of Product Management at Accusoft. “We’re always exploring ways to improve our existing products to help software developers do more for their customers. This update incorporates a lot of feedback we’ve received from our partners.”

In addition to improving rendering fidelity and redaction functionality, version 13.17 also makes significant improvements to PrizmDoc Viewer’s Content Conversion Service (CCS):

  • Convert Markup Changes in Microsoft Word: When converting DOCX files into another file format with CCS, you can now choose to convert accepted or rejected markup changes along with the document text.
  • Convert Speaker Notes in Microsoft PowerPoint: When converting PPTX files into another format using CCS, you can elect to convert the slides only or include any speaker notes in the new document.

Incorporated into thousands of applications worldwide to deliver responsive file viewing and conversion, PrizmDoc Viewer supports multiple proprietary and open file formats. Its powerful REST APIs allow developers to integrate the annotation, redaction, and document comparison features today’s businesses are looking for into their software.

To learn more about Accusoft’s PrizmDoc Viewer or download a trial for a first-hand look, please visit our website.

About Accusoft: 

Founded in 1991, Accusoft is a software development company specializing in content processing, conversion, and automation solutions. From out-of-the-box and configurable applications to APIs built for developers, Accusoft software enables users to solve their most complex workflow challenges and gain insights from content in any format, on any device. Backed by 40 patents, the company’s flagship products, including OnTask, PrizmDoc™ Viewer, and ImageGear, are designed to improve productivity, provide actionable data, and deliver results that matter. The Accusoft team is dedicated to continuous innovation through customer-centric product development, new version release, and a passion for understanding industry trends that drive consumer demand. Visit us at www.accusoft.com.

Question

How can I change the PrizmDoc Viewer so that the TextSelection tool is selected by default instead of the Pan tool?

Answer

In order to select the TextSelection tool by default in PrizmDoc Viewer there are a few things you need to take into account. First, you have to click the button inside the embedViewer() function found in the index page of the sample. Second, the button for the text selection tool is actually disabled initially, so in order to be able to click it, the button has to be enabled first by removing the pcc-disabled class.

Use the following code to do this:

function embedViewer(options) {
    var viewer = $('#viewer1').pccViewer(options);
    viewer.viewerControl.on(PCCViewer.EventType.ViewerReady, function(viewer) {
        $("[data-pcc-mouse-tool=\"AccusoftSelectText\"]").removeClass('pcc-disabled');
        $("[data-pcc-mouse-tool=\"AccusoftSelectText\"]").click();            
    });
}
Question

When doing a text search in a document in PrizmDoc, the highlight color for the search results is a light blue background. Is there a way to change the highlight color for search results in the PrizmDoc Viewer?

Answer

You can change the highlight color specifically in the PrizmDoc Viewer file viewer.js file located in the viewer-assets\js folder of your project/application.

You will need to locate 2 instances of the search term “highlightColor: undefined” in the code block below located close to line 4400. The actual line number will vary depending on the version of viewer.js you are using. You can replace “undefined” with a hexadecimal color value which you can look up from the following site: https://htmlcolorcodes.com/

// This is a request for a new searchQuery triggered by the search input field.
// Generate new search terms, and save them globally.
prevMatchingOptions = _.clone(matchingOptions);

if (matchingOptions.exactPhrase) {
    // We need to match the exact string, as is
    if (queryString.length) {
        searchTerms.push({
            searchTerm: queryString,
            highlightColor: undefined,
            searchTermIsRegex: false,
            contextPadding: 25,
            matchingOptions: matchingOptions
        });
    }
} else {
    // Split up multiple words in the string into separate search term objects
    var queryArr = queryString.split(' ');
    queryArr = _.unique(queryArr);
    _.forEach(queryArr, function(query){
        if (query.length) {
            searchTerms.push({
                searchTerm: query,
                highlightColor: undefined,
                searchTermIsRegex: false,
                contextPadding: 25,
                matchingOptions: matchingOptions
            });
        }
    });
}         
Question

How can I enable content encryption in PrizmDoc Viewer?

Answer

First, you need to enable content encryption on the PrizmDoc Server in the central configuration file. To do this, find the viewing.contentEncryption.enabled section and change the value to true. Save the changes to the file and restart the PrizmDoc services for the change to take effect.

The file paths for the central configuration file are:

Linux: /usr/share/prizm/prizm-services-config.yml
Windows: C:\Prizm\prizm-services-config.yml

Next, you need to enable content encryption in the Viewer. To do this, in the index page of your viewer (Default.aspx in C#, index.php in the PHP sample, index.html, etc.), provide the encryption option in the viewer options parameter as follows so that the Viewer can handle encrypted data:

function buildViewerOptions() {
    ...
    var optionsOverride = args.pop(); // always last arg
    var options = {
        ...
        encryption: true
    };
    var combinedOptions = _.extend(optionsOverride, options);
    embedViewer(combinedOptions);
}

For more in-depth information on enabling content encryption in PrizmDoc, please refer to our documentation here.

Question

I’m receiving the error “Uncaught TypeError: Cannot read property ‘viewer’ of undefined” when trying to embed the PrizmDoc Viewer in my web application. What could be the issue?

Answer

This indicates that the template property in the viewer initialization has not been specified or is undefined.

To fix this, ensure you are loading viewerCustomizations.js.

If the version you are working with predates viewerCustomizations.js, you can get a copy of viewerCustomizations.js from the viewer assets, hosted here, and update your viewer initialization code.

In part one of our series on how APIs are empowering a new generation of LegalTech solutions, we looked at some of the technology obstacles facing today’s legal organizations. We also covered the basic principles of how API integration works and how it can bridge the gap between legacy systems and new applications. In part two, we’ll be taking a closer look at some specific API integration use cases and explain why they’re an essential part of a successful firm’s LegalTech toolkit.

4 Benefits of APIs for Legal Teams

Before going into more detail about how LegalTech API integration works, it’s worth highlighting the broad benefits APIs can deliver to a law firm. 

1. Streamlined Workflows

The average legal department relies on more than one software solution to meet their business needs. While larger firms that provide a broad range of legal services typically require more specialized platforms, even smaller legal teams deploy different software applications to address different business needs.

Thanks to API functionality, these diverse LegalTech solutions can be integrated into a single, platform-agnostic portal that eliminates the workflow disruption caused by constantly switching back and forth between programs. 

2. Remote Functionality

API integrations also make it possible for lawyers to access an assortment of LegalTech tools from any location, even if they can’t physically be at their offices. This capability is more important than ever as the legal profession continues to grapple with the impact of the COVID 19 pandemic. 

Many lawyers are still working from home and communicating with their clients and colleagues remotely. In some states, virtual court proceedings might remain in use even after the pandemic. If law practices aren’t able to function effectively in a remote context, they will struggle to deliver quality legal services to their clients.

3. Competitive Advantage

Managing multiple technology resources and facilitating remote collaboration isn’t just about making work easier for legal teams. Streamlining workflows results in greater efficiency, which means lawyers can spend more time doing high-value work for their clients rather than sorting out technical issues or tracking down hard-to-find documents and files. 

It also translates into reduced costs, since key administrative functions can be automated and carried out both faster and more accurately. Law firms that invest in technology integration can deliver better services to their clients at lower costs than their competition while still retaining the flexibility to adapt to future disruptions.

4. Enhanced Security

By its very nature, the legal industry ends up handling a great deal of sensitive information. Financial records, contracts, protected health data, and private correspondence are frequently relevant to legal proceedings of all kinds. There’s also the matter of attorney-client privilege, which greatly restricts what information can be shared outside the firm. 

Without a way to securely manage files and documents, law firms leave themselves exposed to significant liability. Thanks to API integrations, attorneys can use their existing LegalTech solutions to access, share, and edit essential files safely and securely. 

PrizmDoc Viewer: LegalTech API Integration in Practice

For a better understanding of how API integration can enhance the performance of LegalTech applications, it’s instructive to look at some specific examples. Accusoft’s PrizmDoc Viewer uses a powerful collection of REST APIs to provide HTML5 document viewing functionality through a single interface. It not only allows LegalTech developers to quickly and easily integrate document viewing capabilities into their applications, but it also delivers several additional features that are particularly relevant to the legal industry’s eDiscovery process

Document Conversion

The digitization of the discovery process has made it easier for legal organizations to share documents and back up important data. Unfortunately, it’s also created a huge glut of electronically stored information (ESI) in a variety of formats. In addition to the large number of commonly used file formats (such as DOCX, PDF, and JPEG), firms must also deal with a variety of proprietary file formats and case-specific formats (like DICOM for healthcare clients). PrizmDoc Viewer uses an array of APIs to convert more than 100 file formats for easy presentation within a browser-based HTML5 viewer. It can also convert image-based documents into searchable PDFs or editable text files with a built-in OCR engine. Thanks to this integration, attorneys can quickly share and view documents internally or with clients and the court without having to download and install specialized applications.

Annotation

The ability to annotate and markup documents is essential for any collaborative legal process. Although many platforms make it easy to insert comments and edits into documents, these programs often don’t support more than a handful of file types and alter the original file when making annotations. PrizmDoc Viewer’s annotation functionality supports over 100 file types and allows multiple users to make layered edits that can be easily shown or hidden. More importantly, all markups exist on top of the original document, preserving the integrity of the original file to comply with state and federal preservation of data requirements. When the time comes to present documents, annotations can be burned into the file if necessary. 

Redaction

Sharing documents is always a sensitive process in the legal profession. Information may be protected by attorney-client privilege, disclosure agreements, contractual obligations, or government regulations. LegalTech applications need to be able to redact sensitive data when sharing documents with outside parties. PrizmDoc Viewer’s REST API allows users to manually redact individual sections, use search features to redact specific terms, or even programmatically redact data for pre-determined reasons (such as account numbers or Social Security numbers). Redacted content is not only hidden from view, but no longer shows up in search results and cannot be copied or highlighted.

Security

As mentioned previously, security should be a key consideration for any LegalTech solution. Firms need to strictly control who has access to data and confidential documents, whether that consists of sensitive client information or internal litigation strategies. PrizmDoc Viewer provides a few key features to help LegalTech applications maintain high levels of security.

  • DRM: Digital rights management (DRM) controls can manage who has access to documents and what functions they can use (such as printing, downloading, or viewing). This makes it easy to restrict how files are shared and track any document leaks back to their source to hold the responsible parties accountable.
  • Watermarking: PrizmDoc Viewer can hard code identifying information into documents to prove ownership and prevent the unauthorized reproduction of documentation.
  • Encryption: With so many people working remotely from potentially unsecured Internet connections, file encryption is absolutely essential for any LegalTech application. PrizmDoc Viewer uses 256-bit AES content encryption to ensure that documents remain secure throughout the collaboration process.

Transform Your LegalTech Strategy with API Integration

As we covered in part one, many legal organizations cling to outdated processes and technology due to familiarity and deeply-ingrained status quo bias. But familiar doesn’t always mean functional. Over reliance on manual processes exposes firms to increased human error and a range of potential data security risks, to say nothing of undercutting productivity. Advanced APIs offer a new tactical toolkit, a way to select best-fit code that solves specific issues and helps legal firms improve operational outcomes. Learn more about how Accusoft’s PrizmDoc Viewer can unlock the full potential of your LegalTech applications today.

Question

I’m receiving Uncaught ReferenceError: viewLabel is not defined when trying to embed the PrizmDoc Viewer in my web application. What could be the issue?

Answer

This error indicates that the language property in the viewer initialization has not been specified or is undefined.

To fix this, ensure you are loading viewerCustomizations.js.

If the version you are working with predates viewerCustomizations.js, you can get a copy of viewerCustomizations.js from the viewer assets hosted here and update your viewer initialization code.

The ability to watermark documents is essential for many businesses. By utilizing watermarks, organizations can quickly brand their assets and take steps to protect their valuable intellectual property. When identifying mission critical document features for their applications, developers need to keep in mind all the ways that watermarks continue to be deployed for a variety of use cases.

What Is a Watermark?

A watermark is a semi-transparent line of text or an image that is embedded into a file to indicate that it belongs to a person or organization and cannot be reproduced or distributed without permission. In most instances, watermarks are visible, but some text-based watermarks are embedded in such a way that they only become visible after the document is scanned or printed.

Digital watermarks are one of the earliest and most effective forms of security for documents and images. They are most commonly used by photographers who want to protect their images from unauthorized usage. Their watermark is superimposed over the image, making it difficult to remove without also damaging the source image in the process. 

The same basic principle applies to documents, especially PDF files that are easy to download, view, and distribute. Many organizations continue to add specialized watermarks to their documents to protect both confidential information and intellectual property. Understanding which types of watermarks to use and why is an important aspect of effective document security.

Why Should You Watermark Documents?

There are a few reasons why an organization may want to watermark documents. Although they’re most often associated with security, they can be used for other purposes as well. Here are a few major use cases involving document watermarks:

Classify Documents More Easily

File management can be a challenge for organizations of all sizes. While steps like naming conventions can help somewhat, it can be difficult to keep track of which files can be shared openly and which ones should only be opened and viewed within a secure application environment. Watermarks can be added to documents to indicate how they should be handled. A contract that’s labeled “Confidential,” for instance, makes it clear to the user that they should follow the proper security precautions when viewing the file, such as not leaving the screen open unattended or not sharing their screen with another participant on a video call. It also removes any ambiguity about the nature of the document.

Track Your Documents

While many free watermarking tools only allow users to add a generic logo or text to a document, dedicated viewing solutions like PrizmDoc Viewer can create watermarks that contain unique identifiers, making it easier to track documents throughout their lifecycle. This makes it easier to track down the source of a leak or breach if a file ends up somewhere unexpected. In addition to the security benefits, customized watermarks that include a user name, time stamp, or revision number helps organizations maintain better version control over their documents and avoid any confusion over which file is the most up-to-date.

Discourage Unauthorized Distribution

Watermarks are an easy way to indicate ownership of a document and its contents. While many files, and PDF files especially, are protected by some form of digital rights management (DRM) that limits who can open, edit, or copy them, this form of security is often circumvented by inventive tactics like taking a screenshot, capturing video footage, or even photographing a screen with an external device. 

If the captured document has a watermark, it will be quite difficult for someone to distribute the file without revealing the owner. While it’s possible to remove a watermark without damaging the document contents, doing so can be a difficult and time-consuming process that often isn’t worth the effort. More importantly, if the watermark contains identifying information, it’s often possible to find out where a security breach occurred and then locate those responsible for it.

How to Watermark Documents

While many organizations understand the value of adding watermarks to their documents, they often don’t have the tools in place to do so effectively at scale. There are a number of free watermarking web applications available, but these sites typically require a file to be uploaded first, which creates a huge security risk for most businesses. In many cases, this process is also irreversible because it burns the watermark into the document itself. 

Microsoft Word can easily add watermark text or images to a document, but they’re also quite easy to remove. In fact, a quick Google search points to multiple resources for removing Word-based watermarks from both DOCX and PDF files.

PrizmDoc Viewer supports multiple forms of document watermarks natively within an application, including identifying text, diagonal text, and images. More importantly, since the watermark is associated with the document viewing session, it isn’t applied to the source document itself, which remains secure within the main application. Watermark document properties can be specified to include more than one watermark in a viewing session, even supporting mixed types on different areas of the page.

Text Watermarks

The watermark API for PrizmDoc Viewer allows users to adjust the location, size, and style of the text. Information included can be adjusted based on document needs.

Diagonal Text Watermarks

PrizmDoc Viewer can apply a single directional text watermark across the center of the page. By including control characters in the text string, it’s possible to create line breaks in the text.

Image Watermarks

The watermark API can also add a transparent PNG file to the document, which is ideal for displaying a company logo. PrizmDoc Viewer can adjust the opacity of the watermark regardless of whether it’s an image or text.

By adding multiple watermarks, organizations can easily brand their files across the company while also providing effective tracking information for individual documents.


Start Watermarking Documents Today with PrizmDoc Viewer

A fully-featured HTML5 viewer, Accusoft’s PrizmDoc Viewer is easily integrated into web applications in need of comprehensive viewing and document management capabilities. In addition to watermarking, it delivers conversion, OCR, annotation, and redaction support for more than 100 different file types. Get a hands-on view of how easily PrizmDoc Viewer can apply custom watermarks to your documents with our watermarking API demo.

Question

I’m receiving Uncaught ReferenceError: viewLabel is not defined when trying to embed the PrizmDoc Viewer in my web application. What could be the issue?

Answer

This error indicates that the language property in the viewer initialization has not been specified or is undefined.

To fix this, ensure you are loading viewerCustomizations.js.

If the version you are working with predates viewerCustomizations.js, you can get a copy of viewerCustomizations.js from the viewer assets hosted here and update your viewer initialization code.