Technical FAQs

Question

What’s the difference between a Viewing Session and a Viewing Package?

Answer

Viewing sessions require source information for the document that you want to view. There are 3 types of sources to choose from: File, URL, and viewing package.

A viewing package is a file you want to view that is stored in its already “converted state”, which we call “pre-conversion”. This is different than a file or URL because these sources are converted and set in a temporary cache folder for use until the cache is cleared out.

Viewing package information can be set to never expire which is useful if you have documents that will be viewed over and over again by many clients. This allows the server not to have to convert the file every time and increases performance.

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

Sometimes, when redacting an Office or PDF document, redactions drawn over certain content (such as an image or a logo) appears to get burned on other occurrences of the image on other pages. Why does this happen?

Answer

The reason why the duplicate redactions are occurring is because the images are shared images. In PrizmDoc, when a change is made to one instance of the shared image, it gets applied to every other instance. Per engineering, this is to mimic the behavior of Adobe Acrobat.

There currently exists a feature request to allow shared images to be treated as individual images so that they could be redacted separately:

https://ideas.accusoft.com/ideas/PDV-I-655

Question

When selecting download and including annotations, the resulting PDF does not include the comments. How can we obtain the file as a PDF with the annotation comments included?

Answer

By design, when using the download button, the comments to the annotations are not included in the download.

Workaround

  1. Under the View tab, select Print.
  2. From the Print dialog, select the More options drop-down.
  3. Under the Comments section, select either After Each Page or At End of Document.
  4. When selecting a printer, use the Print to PDF option and it will create a PDF with the comments included.
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();
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

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

My PrizmDoc Cloud hosted server is reporting as unlicensed even though the license lease file is being written to the S3 bucket, what could be causing this?

Answer

This issue can occur when using a single S3 bucket for both licensing files as well as additional document storage. When our cloud licensing module attempts to search for the expected lease file inside of this S3 bucket, it requests the list of objects in that directory. However, whenever there are more than 1,000 objects in this bucket, this call only returns a list of the first 1,000 objects.

If there are over 1,000 objects in the bucket, then this could cause the Licensing Service to not see the license lease file when it gets the list of files. The result is that no lease file is found, which in turn causes the service to go unlicensed.

The solution for this issue is to make sure the bucket you are using for licensing is only used for that purpose. Should you encounter this issue, try moving all other files out of the bucket. If that is not possible, you may need to contact Accusoft Support to request changing the bucket your license uses for licensing.

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

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

For ImageGear .NET, what are the feature differences between an OCR Standard license, an OCR Plus license, and an OCR Asian license?

https://www.accusoft.com/products/imagegear-collection/imagegear-dot-net/#pricing

Answer

ImageGear’s OCR library has three different functionality options that you can choose for your website or application. The primary difference between the three options is the output formats created by the OCR engine. The options for your development are as follows:

  1. OCR Standard:
    The standard edition creates output formats for Western languages such as English. The standard edition outputs text only files and generates a PDF. The file formats it includes are searchable text PDFs and text documents.

  2. OCR Plus:
    The standard plus edition creates formatted outputs for Western languages like English. The formatted output is created with recognition technology that identifies font detail, locates image zones, and recognizes table structure in order to create a representation of the original document. The file formats it includes are Word, Excel, HTML, searchable PDF, and text documents.

  3. OCR Asian:
    The Asian edition creates a formatted output for Asian languages like Chinese, Japanese, and Korean. This formatted output is created with the same recognition technology as the Standard Plus that identifies font detail, locates image zones, and recognizes table structure. It also creates a representation of the original file. Formats include Word, Excel, HTML, searchable PDF, and text documents.

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.