Technical FAQs for "PrizmDoc"

Question

Where does PrizmDoc store E-Signatures and how can I retrieve them?

Answer

PrizmDoc does not store E-Signatures on the server. However, PrizmDoc does store them in the browser’s local storage so that an end user can use the same signature across multiple documents and multiple sessions within the same browser.

In the Viewer Sample, end users are able to save their individual signatures for their own record using the “Download Signature” button under the Manage E-Signatures menu. This will download a plain-text JSON file of the selected signature.

In the E-Signing Sample, if you want to retrieve the E-Signature from your own browser, you can open the developer tools (F12 on Chrome), go to the application tab, select local storage, and inside you can find the JSON of the E-Signature in the value of pccvEsignSignatures.

Question

In PrizmDoc, my document appears to be small on the page relative to the viewer. How can I fix this?

enter image description here

Answer

By default, PrizmDoc renders a PDF file according to the MediaBox, which is normally the same as CropBox, though sometimes this is not the case. The larger area you see in the PrizmDoc Viewer is the size of the MediaBox. Please note that the product provides the fileTypes.pdf.pageBoundaries control option (or useCropBox in the older versions) to change the default behavior. Try setting the option to cropBox in the Central Configuration File in order to get the PDF content rendered according to the CropBox. You can read more about configuring image frame rendering in our documentation here.

For additional reading, see 7.7.3.3 on “User Space” of Adobe’s PDF 1.7 specification:

https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf

Note: In some older versions of PrizmDoc, there exists an issue where setting the pageBoundaries field to cropBox can cause light blurring/distorting on the page. This issue was addressed in version 13.4.

Question

Why is the searchTasks endpoint returning an invalid JSON from very large requests?

Answer

Though no official size limit has been published, PAS will return a misleading invalid JSON error if you send in several thousand search terms at once. The exact maximum seems to vary across different installs. We have logged a story in our backlog about making a more explicit size limit possible, but there is no current plan to allow for PrizmDoc to handle search requests of unbounded size.

The best workaround for this behavior is to split your search terms between multiple requests, rather than packing them into one request.

Question

What is the proper way of using affinity tokens in cluster mode where multiple file IDs using multiple affinity tokens need to be combined?

Answer

If you are using PrizmDoc Server in cluster (multi-server) mode, and you are using Content Conversion Services to merge multiple files into one, or whenever multiple file ids using multiple affinity tokens need to be combined; your requests need to use a single affinity token. Because affinity tokens need to go in the header, you might think you are required to include all/both of the files’ affinity tokens in the header.

If you find yourself in this situation, the correct method is to re-use the first affinity token you get for all subsequent resources you create. For example, if you create a work file, you’ll get an affinity token back in the response. That affinity token needs to be set in the Accusoft-Affinity-Token request header of any subsequent resources (work files, content converter, viewing sessions, etc.) that you create later and want to use together.

An example is located here:

https://help.accusoft.com/PrizmDoc/latest/HTML/affinity-tokens-and-cluster-mode.html

The main takeaway here is that the initial request that is made to the server for a workfile will return an affinity token. This very same affinity token must be used in the header Accusoft-Affinity-Token for all subsequent requests in this conversion/stitching process.

The most relevant quote from that page is:

“In cluster mode, the PrizmDoc Server API will automatically generate an affinity token when it receives a POST request for a new ViewingSession, WorkFile, MarkupBurner, RedactionCreator, or ContentConverter resource and return it in the response. Once you have obtained an affinity token, you will need to pass this in with related requests using the Accusoft-Affinity-Token HTTP custom header.”

Here is a separate custom example of stitching two TIFF images together by converting them to a PDF.

First TIFF image

Request with no affinity token:

POST /PCCIS/V1/WorkFile HTTP/1.1
Host: prizmdocservername:18681
Content-Type: application/octet-stream

Response:

{
    "fileId": "I3GRFEfrw_K8fX4VJ7Z1bQ",
    "fileExtension": "tif",
    "affinityToken": "ZSTudgjA42h1CVCj0KkGuYiKn5nEFhmFrvA0AkMxDxc="
}

Second TIFF image

Request:

POST /PCCIS/V1/WorkFile HTTP/1.1
Host: prizmdocservername:18681
Content-Type: application/octet-stream
Accusoft-Affinity-Token: ZSTudgjA42h1CVCj0KkGuYiKn5nEFhmFrvA0AkMxDxc=

Response:

{
    "fileId": "I-CTRdFnaL8FLNQDUawTHw",
    "fileExtension": "tif",
    "affinityToken": "ZSTudgjA42h1CVCj0KkGuYiKn5nEFhmFrvA0AkMxDxc="
}

Content Conversion

Request:

POST /v2/contentConverters HTTP/1.1
Host: prizmdocservername:18681
Content-Type: application/json
Accusoft-Affinity-Token: ZSTudgjA42h1CVCj0KkGuYiKn5nEFhmFrvA0AkMxDxc=

{
    "input": {
        "sources": [
            { 
                "fileId": "I3GRFEfrw_K8fX4VJ7Z1bQ"
            },
            { 
                "fileId": "I-CTRdFnaL8FLNQDUawTHw"
            }
        ],
        "dest": {
            "format": "pdf"
        }
    }
}

Response:

{
    "input": {
        "dest": {
            "format": "pdf",
            "pdfOptions": {
                "forceOneFilePerPage": false
            }
        },
        "sources": [
            {
                "fileId": "I3GRFEfrw_K8fX4VJ7Z1bQ",
                "pages": ""
            },
            {
                "fileId": "I-CTRdFnaL8FLNQDUawTHw",
                "pages": ""
            }
        ]
    },
    "expirationDateTime": "2018-10-03T19:12:52.005Z",
    "processId": "1u6k5Y_l7yRfhWyfL1t4Yw",
    "state": "processing",
    "percentComplete": 0,
    "affinityToken": "ZSTudgjA42h1CVCj0KkGuYiKn5nEFhmFrvA0AkMxDxc="
}

Content Conversion Request:

/v2/contentConverters/{processId}

GET /v2/contentConverters/1u6k5Y_l7yRfhWyfL1t4Yw HTTP/1.1
Host: prizmdocservername:18681
Accusoft-Affinity-Token: ZSTudgjA42h1CVCj0KkGuYiKn5nEFhmFrvA0AkMxDxc=

Content Conversion Complete Response:

{
    "input": {
        "dest": {
            "format": "pdf",
            "pdfOptions": {
                "forceOneFilePerPage": false
            }
        },
        "sources": [
            {
                "fileId": "I3GRFEfrw_K8fX4VJ7Z1bQ",
                "pages": ""
            },
            {
                "fileId": "I-CTRdFnaL8FLNQDUawTHw",
                "pages": ""
            }
        ]
    },
    "expirationDateTime": "2018-10-03T19:12:52.005Z",
    "processId": "1u6k5Y_l7yRfhWyfL1t4Yw",
    "state": "complete",
    "percentComplete": 100,
    "output": {
        "results": [
            {
                "fileId": "tK4UbzryHWFoqOC6JJAjAg",
                "sources": [
                    {
                        "fileId": "I3GRFEfrw_K8fX4VJ7Z1bQ",
                        "pages": "1"
                    },
                    {
                        "fileId": "I-CTRdFnaL8FLNQDUawTHw",
                        "pages": "1"
                    }
                ],
                "pageCount": 2
            }
        ]
    }
}

Download The WorkFile:

/PCCIS/V1/WorkFile/{fileId}

GET /PCCIS/V1/WorkFile/1u6k5Y_l7yRfhWyfL1t4Yw HTTP/1.1
Host: prizmdocservername:18681
Accusoft-Affinity-Token: ZSTudgjA42h1CVCj0KkGuYiKn5nEFhmFrvA0AkMxDxc=
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

How do I store and retrieve documents in subdirectories of the configured documents directory in PrizmDoc PAS?

Answer

You can retrieve documents from subdirectories when dealing with local files. Simply pass the subfolder in the fileName parameter when creating the viewing session. You can test this by manually placing a document inside a subfolder and making the following POST request:

`http://localhost:3000/ViewingSession`

    {
        "source": {
            "type": "document"
            "fileName": "folder/document.pdf"
        }
    }
Question

How do I get Viewing Packages working in PrizmDoc?

Answer

Viewing Package Full Setup Instructions

We recommend pre-converting documents through a feature called viewing packages and it can be turned on in PAS Configuration.

viewingPackagesdefault: disabled – Enable Pre-Conversion Services and APIs, which allow you to pre-convert documents and cache on-demand document views in PAS, to improve the speed at which documents can be viewed, as well as reduce the processing time in PrizmDoc Server for repeat document views.

Enable Viewing Packages Feature

feature.viewingPackages: enabled

Since viewing packages also use a database you will need to create a database for PAS, configure a database, and run the scripts that are included to create the tables necessary for viewing packages to work.

Configuring Database


Install Microsoft SQL Express

Note 1: If you have Visual Studio installed, you might have to uninstall the recent versions of C++ that are installed before MSSQL Express will successfully install.

Remove Visual Studio C++ Redistributables

Note 2: When installing, use all default install settings except for setting a custom database instance id and set mixed mode authentication so a custom password can be set.

Turn On TCP/IP For Database Instance

Step 1:

step 1 enable tcp/ip

Step 2:

enable tcp/ip

Set Port 1433 for TCP/IP Connection

set port 1433 for tcp/ip connection

Restart SQL Express Instance

Right-click and select "Restart" or double-click and select "Restart".

restart sql express instance

Install Microsoft SQL Management Studio

Install from this downloads page

Connect To Database Instance In Microsoft SQL Management Studio

Connect To Database Instance In Microsoft SQL Management Studio

Create A Database In Microsoft SQL Management Studio

Create A Database In Microsoft SQL Management Studio

PAS Config Database Settings

feature.viewingPackages: "enabled"

database.adapter: "sqlserver"
database.host: "localhost"
database.port: 1433
database.user: "sa"
database.password: "Password1"
database.database: "prizmdb"


# Default timeout for the duration of a viewing session

defaults.viewingSessionTimeout: "20m"

viewingPackagesData.storage: "database"
viewingPackagesProcesses.storage: "database"
viewingSessionsData.storage: "database"
viewingSessionsProcessesMetadata.storage: "database"

viewingPackagesArtifactsMetadata.storage: "database"
viewingPackagesArtifacts.storage: "filesystem"
viewingPackagesArtifacts.path: "%ALLUSERSPROFILE%\\Accusoft\\Prizm\\ViewingPackages"

Create the database tables

Create the database tables

Restart PAS

Restart PAS


Create Viewing Package

viewing-package-creator

Get State of Viewing Package Creator Processing

viewing package creator process

Get Viewing Package Info With Document Id

viewing package info with document id

Create Viewing Session From Viewing Package With Document Id

Create Viewing Session From Viewing Package

View Document In Viewing Package With The Created Viewing Session Id

View Document In Viewing Package With The Created Viewing Session Id

For examples of creating viewing packages, click on the link below to see the various ways of using them:

Viewing Package Creators

Question

I have a PDF of a form that I’m sending to PrizmDoc to have it auto-detect, but PrizmDoc does not find any fields in the document. What would cause this?

Answer

Currently only PDF files with embedded AcroForms will be auto-detected. If the PDF document
has an embedded image of a form, PrizmDoc will not find any results from auto-detection.

Question

With a fully-running PrizmDoc environment (version prior to v10.5), I’m noticing times where the system becomes unresponsive. That is, at some point, it no longer processes requests being made to the backend and I have to restart PrizmDoc in order to alleviate it. What could be causing this?

Answer

Prior to version 10.5, PrizmDoc used ProxyServer as its image processing system. Our Development Team eventually began seeing that the ProxyServer exhibited architectural problems that lead to a multitude of issues, such as unresponsiveness.

Starting in version 10.5, the Development Team created the Prizm Content Connect Imaging Service (PCCIS), which is far more stable.

To resolve this issue we suggest upgrading to the latest revision of PrizmDoc. Please see the product page for more information found here: https://www.accusoft.com/products/prizmdoc/overview/

Question

When specifying the Amazon AWS access keys or IAM Role associated to the S3 bucket, what are the minimum necessary rights that I need to have for licensing to function?

Answer

The security policy associated to the IAM Role or User who has access to the S3 bucket needs to contain specific S3 bucket rights below:

listObjects

  • AWS S3 listObjects docs
  • Requires s3:ListBucket

putObject

  • AWS S3 putObject docs
  • Requires s3:PutObject

deleteObjects

  • AWS S3 deleteObjects docs
  • Requires s3:DeleteObject
Question

Are there any specific applications or folders which should be excluded in order for PrizmDoc to work on a system with antivirus software?

Answer

As a suggestion, the first place to start would be your antivirus logs to ensure there are no entries specific to the following services:

  • conhost.exe
  • node.exe
  • policyhost.exe
  • PrizmApplicationServices.exe
  • wmiprvse.exe

If there are, you can exclude those files or the following folders where PrizmDoc is installed by default. If you modified the folder name for PrizmDoc, ensure to include that name.

  • C:\Prizm
  • C:\ProgramData\Accusoft

Please consult your antivirus documentation for instructions on how to add exclusions.

Question

If I have a PDF document that only has an embedded image in it (no text objects, etc.), can PrizmDoc Viewer take it and create a searchable PDF file from it?

Answer

Yes. PrizmDoc’s Content Conversion Services can take an image-only PDF and create a searchable PDF file from it. This can be done by modifying the input.dest.pdfOptions.ocr options object; see our documentation here.

If you are attempting to make a searchable PDF from an existing PDF document, please note that the source PDF file should be an image-only PDF. PrizmDoc will not create a searchable file from already-existing vector content.

This feature was introduced in PrizmDoc 13.1, please see our Release Notes for more information.