Technical FAQs

Question

I am trying to retrieve documents and files to view in PrizmDoc Viewer. The files are located in a NAS device. The file server is available via an HTTP link but I would prefer not to use the HTTP put method.

Answer

A NAS device is short for Network Attached Storage. Typically, to access these devices would be no different than a shared network drive from a server.

You can setup Prizm Application Services (PAS) to point to a NAS device, if there are actual file shares set up on that device. Also, a key note to remember is that both PrizmDoc and PAS should be running with a domain id which has full access to that share so that the services can access the files when called.

For instance, you have a folder on the NAS device called PrizmFolders and it is shared with a network drive share of \mynasdevice\PrizmFolders. You can modify the pcc.win.yml file to point to that root folder by updating the document.path as outlined below. Keep in mind that the backslashes have to be escaped so you will need an extra backslash for each backslash in the path:

documents.path:"\\\\mynasdevice\\PrizmFolders"

Once this is done, when posting a viewing session through PAS, you can simply specify the subfolder\filename. For instance, if there was a folder called northregion and a file called metrics.pdf (\mynasdevice\PrizmFolders\northregion\metrics.pdf) you would be able to specify northregeion\metrics.pdf in the post command.

Question

I would like to be able to query my PrizmDoc Server for all documents currently in a state of processing. I want to be able to do this to determine if a document is “hanging” during conversion, to determine my system’s efficiency (My RAM and CPU are at X% with ten documents converting), or for other tasks. This is currently possible for individual processes if you know the process ID. Is this possible for all processes?

Answer

The current version of PrizmDoc does not have an API to determine if any file is currently converting on PrizmDoc Server. PrizmDoc provides viewingPackageCreator, contentConverter, redactionCreator, and markupBurner APIs that report the status of a specific process, and whether it is in progress or not. However, it is currently necessary to know a specific processId to obtain that information.

There is an active Feature Request for this item available for viewing here.

Question

Why am I experiencing poor zoom or layout experience on mobile devices when pinching and navigating?

Answer

For the best mobile experience make sure and include the following meta tag in the head section of the document containing the viewer:

<metacontent="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"name="viewport"/>

 

Question

I know the coordinates and dimensions of the content I would like to highlight, but the highlight annotation only works on text. Is there a way to create an annotation that highlights a specific area of a document?

Answer

The best way to do this would be to create a yellow rectangle annotation with 50% opacity (these are the same default values used by the text highlight annotation). The code below demonstrates how to do this in the viewer:

//Create a new rectangle annotation
var rectangleMark = viewer.viewerControl.addMark(1,  PCCViewer.Mark.Type.RectangleAnnotation);
//Set the coordinates and dimensions of the annotation
rectangleMark.setRectangle({x: 100, y:  100,  width : 200, height: 200});
//Set fillcolor to yellow
rectangleMark.setFillColor("#FFFF00");
//Remove the border
rectangleMark.setBorderColor("transparent");
//Set opacity to 50%
rectangleMark.setOpacity(127);
Question

In some other viewers, there are highlights or markers that appear on the UI to indicate that annotations are available for a given page or document. Is there a way to implement this in PrizmDoc?

Answer

Sure can, you just need to make a MarkupLayerRecords request to determine if there are marks that pertain to the given Viewing Session. Keep in mind that documents don’t really have a specific set of annotations associated with them though — Markup IDs do, and you can specify any Markup ID you want when you create a viewing session:

// Add rules to your CSS for the following classes.
// The actual style information can be whatever you like.
//
// .mark-indicator {
//     background-color: gold !important;
// }
//
// .marked-page-indicator {
//     background-color: gold !important;
// }

let pasUrl = "http://localhost/pas-service"; // Example PAS proxy URL
let viewingSessionId = <%= viewingSessionId %>; // Example viewingSessionId
let thumbnailButton = $(".pcc-icon-thumbnails");
let pageIndicatorsAdded = false;
let thumbnailsClicked = false;
let marksRetrieved = false;
let markedPages = {};

async function addPageIndicators() {
    console.log("Attempting to add page indicators...");
    if (thumbnailsClicked && marksRetrieved && !pageIndicatorsAdded) {
        console.log("Conditions met.");

        let wrappers = $(".pccThumbnailWrapper");

        wrappers.each(function(index, wrapper) {
            if (markedPages[index]) {
                $(wrapper).addClass("marked-page-indicator");
            }
        });

        pageIndicatorsAdded = true;
    } else {
        console.log("Conditions not met");
    }
}

thumbnailButton.click(function() {
    console.log("Thumbnails button clicked.");

    thumbnailsClicked = true;

    addPageIndicators();
});

async function apiCall(type, url, body = {}) {
    return await $.ajax({
        "type": type,
        "url": url,
        "contentType": "application/json",
        "data": JSON.stringify(body)
    });
}

async function createMarkIndicators() {
    let output = await apiCall("GET", `${pasUrl}/MarkupLayers/u${viewingSessionId}`);

    if (output.length > 0) {
        console.log("Found layers.");

        thumbnailButton.addClass("mark-indicator");

        let layers = await Promise.all(output.map(function(element) {
            return apiCall("GET", `${pasUrl}/MarkupLayers/u${viewingSessionId}/${element.layerRecordId}`);
        }));

        layers.forEach(function(layer) {
            layer.marks.forEach(function(mark) {
                markedPages[mark.pageNumber - 1] = true;
            });
        });

        marksRetrieved = true;

        console.log("Marks retrieved.");

        addPageIndicators();
    } else {
        console.log("No layers found.");
    }
}

createMarkIndicators(); 
Question

We are trying to create new viewing packages, however, in the [prizmdoc_process] table we see the process is 100% complete. However, the error code field indicates an Internal Error.

The document does not display in the viewing session and gives a 480 error. The following error code is:

{errorCode: “ViewingPackageNotUsable”}

What might be the issue?

Answer

When creating viewing packages, the PrizmDoc Application Services (PAS) uses the PrizmDoc Server to do the conversion work. In order for the viewing package to be created successfully, the PrizmDoc Server needs to be licensed and healthy.

If you see an error “ViewingPackageNotUsable” this can be related to the PrizmDoc Server either not being healthy or specifically not being licensed.

To verify the PrizmDoc Server status and if it is licensed, you can run the following command on the PrizmDoc Server in a web browser:

http://localhost:18681/admin

Question

When using Content Conversion Services, what are the supported input formats that it takes for conversion?

Answer

When using Content Conversion Services, you can input any image and document source type that PrizmDoc supports.

Here’s a link to the Content Conversion Services API for more information.

Question

When viewing an Excel document with hidden content in the viewer, the content remains visible when otherwise expected to remain hidden. Is this intended behavior?

Answer

Short answer: Yes.

Currently, both PrizmDoc Cloud and PrizmDoc Viewer (Self-Hosted) are configured to render hidden content by default, so this is expected behavior.

For PrizmDoc Viewer (Self-Hosted) users, this rendering behavior is configurable using the central configuration file.

The file paths for the central configuration file are:

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

Simply add/modify the following parameter:

fileTypes.excel.renderHiddenContent: false

Setting the render option to false will hide content as expected, whereas true will render it.

Question

If I upload an HTML document to PrizmDoc that has image tags in it, will those images be rendered in the Viewer or will only the text be displayed?

What if the image tags are referencing local images?

Answer

When loading an HTML file, PrizmDoc will render image tags that are sourced from publicly accessible URLs. The relative links may not render though, as it’s likely that the source will not be found.

In PrizmDoc 13.2, a server-side configuration option called:

security.htmlRendering.blockExternalContent

was introduced to control whether or not externally-referenced HTML content will be blocked.

See the release notes for more information.

Question

How does the PrizmDoc print function work exactly?

Answer

Every page of the specified print range is being loaded and sent to the printer. This occurs in an iframe separate from what is shown in the Viewer so the user does not actually see this happening.

The actual method being used is one of the following, depending on the browser:

  • _iframe.contentWindow.document.execCommand('print', false, null);
  • _iframe.contentWindow.print();

Discover the future of legal data management with AI-powered PII detection and redaction. As legal entities grapple with vast volumes of sensitive data, AI-driven solutions provide a welcome relief, transforming case management, eDiscovery, and practice management software. Navigating the data deluge, AI revolutionizes the identification and categorization of PII in extensive datasets, minimizing the risk of errors. Ensuring compliance with complex data protection regulations becomes seamless as AI automates checks, reducing the burden on legal practices and mitigating legal risks. Experience the future with PrizmDoc’s AI capabilities, setting a new standard in identifying sensitive content and ensuring a leap towards a more efficient, secure, and compliant legal practice.