Technical FAQs

Question

Can I use all of the features and configuration options in PrizmDoc Cloud-Hosted that I can in PrizmDoc Self-Hosted?

Answer

Currently, PrizmDoc Cloud does not allow for editing the server central configuration parameters, but the defaults have been set to allow for more complex documents that might otherwise fail in order to account for the lack of ability to modify these options.

Question

After restarting the Prizm Services, you may notice that the http://localhost:18681/admin status page shows a status of “unhealthy” and in the Internal Services section, the mongo-manager-service is showing a clock, and the text-service is showing a red x.

How can this be fixed?

Answer

Reason:

This will typically occur when the mongo-manager-service detects an unclean shutdown and the cache gets corrupted.

How to Verify:

You can do a search in the C:\Prizm\logs\mongod.log file on Windows or the /usr/share/prizm/logs/mongod.log file on Linux for the word "unclean" and you may find the following error:

Detected unclean shutdown -
C:\Prizm\cache\mongo-manager-service\data\mongod.lock is not empty.

Resolution:

  1. Stop the Prizm Services.

  2. For PrizmDoc 13.3 and above, clear out all subfolders under prizm\cache (leave the prizm\cache folder).

  3. For PrizmDoc 13.2 and prior, clear out all files and subfolders under C:\Prizm\services\mongo-manager-service\bin\mongodb\data

  4. Start the Prizm Services.

Question

Currently we are using PAS for viewing packages and it is pointed to our Accusoft Cloud subscription API key. PAS is installed locally and we store the viewing package artifacts in our S3 bucket. We are using 600 GB of storage on S3 for the viewing package artifacts we already have converted.

We would like to start using Accusoft’s Cloud PAS API to create viewing packages and no longer wish to host our own PAS and have the following questions:

  1. Is there a way we can migrate our current artifacts from our S3 bucket to Accusoft’s S3 bucket?

  2. Is there an additional charge for storing the artifacts at Accusoft?

  3. Is there a way to point the Cloud PAS to our existing S3 bucket?

Answer

Q: Is there a way we can migrate our current artifacts from our S3 bucket to Accusoft’s S3 bucket?

A: We do not currently offer an API for directly importing your existing viewing packages. However, you can re-create your viewing packages in PrizmDoc Cloud using the original source document.

Q: Is there an additional charge for storing the artifacts at Accusoft?

A: At this time there is no additional charge. However, this is
subject to change.

Q: Is there a way to point the Cloud PAS to our existing S3 bucket?

A: There is currently no setting available to configure your PrizmDoc Cloud account to use an S3 bucket which you own. If you use PrizmDoc Cloud, the storage is managed by Accusoft. If you need to own and manage the storage yourself, you’ll want to use your own Self-Hosted PAS.

Question

In ImageGear, why am I running into AccessViolationExceptions when I run my application in parallel?

Answer

This issue can sometimes occur if ImGearPDF is being initialized earlier in the application. In order to use ImGearPDF in a multi-threaded program, it needs to be initialized on a per-thread basis. For example, if you have something like this:

ImGearPDF.Initialize();
Parallel.For(...)
{ 
    // OCR code
}
ImGearPDF.Terminate();

Change it to this:

Parallel.For(...)
{
    ImGearPDF.Initialize();
    // OCR code
    ImGearPDF.Terminate();
}

The same logic applies to other ImageGear classes, such as ImGearPage instances or the ImGearRecognition class – you should create one instance of each class per thread, rather than creating a single instance and accessing it across threads. In the case of the ImGearRecognition class, you’ll have to use the createUnique parameter to make that possible e.g.:

ImGearRecognition recEngine = ImGearRecognition(true);

instead of

ImGearRecognition recEngine = ImGearRecognition();
Question

I have just installed PrizmDoc to my Windows server. When checking the status using http://localhost:18681/admin, the service is showing in a starting phase and ms-office-conversion-service is showing a clock icon, but it never starts.

What are some reasons as to why this might occur?

Answer

This can happen if your PrizmDoc license has the MSO feature enabled and you do not have Microsoft Office 2013 or 2016 installed, or Office 2013 or 2016 is not activated.

To fix this issue you can either:

  • Install Microsoft Office 2013 or 2016, activate it, and reboot the server.

Or:

  • Switch PrizmDoc to use LibreOffice until you are able to install Microsoft Office by modifying C:\Prizm\prizm-serivices-config.yml and updating the line:

    #fidelity.msOfficeDocumentsRenderer: auto
    

    to:

    fidelity.msOfficeDocumentsRenderer: libreoffice
    
Question

I changed the value of viewingSessionTimeout

Answer

If you are using Windows, the value that you are looking to modify is the viewing.sessionLifetime in the central config file prizm-services-config.yml located in the root of the PrizmDoc installation directory (C:\Prizm on Windows, /usr/share/prizm on Linux).

Make sure it is uncommented and without any leading whitespace.

Additionally, please make sure the viewing.cacheLifetime is greater than the viewing.sessionLifetime value.

More information can be found here.

You must restart the PrizmDoc service in order for your changes to take affect.

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

I have already licensed PrizmDoc. Where can I find my license key?

Answer

At the very top of the prizm-services-config.yml file located at C:/Prizm/ on Windows and /usr/share/prizm/ on Linux, you can locate the license key:

######################### PrizmDoc Configuration ###############################

############################### Licensing ######################################

license.solutionName: ________
license.key: 2.0...