Technical FAQs

Question

Is there a way to modify the colors used in PrizmDoc Viewer’s search results? In particular, the currently selected search result has a very similar color to the other results from the same term. Is there a way to increase the contrast?

Answer

Currently, we don’t support the ability to set anything other than the highlight color through the search API.

There is a feature request to enable such modifications:

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

Question

How can I get a document’s dimensions with PrizmDoc?

Answer

There are two methods you can use to do this with PrizmDoc:

The first method is using the requestPageAttributes() method from ViewerControl. This method allows you to get the width and height of a page in the document in pixels. Below is sample code on how to use requestPageAttributes() to get the attributes of page 1 of a document:

viewerControl.requestPageAttributes(1).then(function(attributes) {
    var pageWidth = attributes.width;
    var pageHeight = attributes.height;
});

The second method is done by making a GET request to the PrizmDoc server to get metadata for a page of the source document in a viewing session. The request is:

GET /PCCIS/V1/Page/q/{{PageNumber}}/Attributes?DocumentID=u{{viewingSessionId}}&ContentType={{ContentType}}

The content type needs to be set to “png” for raster content and “svgb” for SVG content. The request returns the data in a JSON object containing the image’s width and height. The units for the width and height are in pixels when the contentType is set to “png” and unspecified units when the content type is set to “svgb”.

The request also returns the horizontal and vertical resolution of raster content when the content type is set to “png”. This information is similar to pixels per inch, but the units are unspecified, so if you wanted to calculate the size of the document you can calculate it by width divided by horizontal resolution or height divided by vertical resolution. The resolution is hard-coded to 90 when contentType is set to “svgb”.

Question

How can I remove the scroll bar/disable scrolling in PrizmDoc Viewer?

Answer

A quick way to do this would be to have something like the code below. Make sure to do this after this DOM element has loaded, so after the viewer is ready.

$('.pccPageListContainerWrapper').css('overflow', 'hidden');

The following will both remove the scroll bar, and disable scrolling:

$('.pccPageListContainerWrapper').css('overflow', 'unset');
Question

I want to re-arrange the page order of a PDF. I’ve tried the following…

var page = imGearDocument.Pages[indx].Clone();

imGearDocument.Pages.RemoveAt(indx); //// Exception: "One or more pages are in use and could not be deleted."

imGearDocument.Pages.Insert(newIndx, page);

But an exception is thrown. Somehow, even though the page was cloned, the exception states that the page can’t be removed because it’s still in use.

What am I doing wrong here?

Answer

If you’re using an older version of ImageGear .NET, you may run into this exception when you clone the page. Some of the resources between the original and the clone are still shared, which is why this happens.

Starting with ImageGear .NET v24.8, this no longer happens, and the above code should work fine.

If you still need to use the earlier version, you can use the InsertPages method instead.

Question

No matter what CSS I use, the viewer’s div always consumes the full screen. How can I fix it?

Answer

If you’re trying to modify the PrizmDoc Viewer samples, then your CSS is most likely being overridden by the setting fullScreenOnInit: true. Change this property to false and you should be able to use any of the scaling CSS that you would use on a normal div.

Question

Can we give network paths for source document location as well?

For example //10.216.2.312/test/test.doc

https://help.accusoft.com/PrizmDoc/latest/HTML/webframe.html#Transfer_Your_Document_to_PrizmDoc_Server.html.

When using http URL, for security reasons, only absolute paths are allowed, but could you map test to documents and use a local file?

Answer

Documents are stored by default in:

C:\ProgramData\Accusoft\Prizm\Documents 

so if the type in the request for source is document it will look in that folder. The configuration for that is set in PAS config:

    {
        "source": {
            "type": "document",
            "fileName": "1040ez.pdf"
        }
    }
Question

When I click on the download button a ‘download options’ pane appears to the left of the Viewer.

Is there a way I can modify the client code such that clicking the download button skips this step and just downloads the document as a PDF, burning in all the marks/redactions/e-signatures?

Answer

To clear the event listener for the download button and attach your own, you can add this in your client-side JavaScript after the Viewer has been initialized:

$("button.pcc-icon.pcc-icon-download").off("click");

$("button.pcc-icon.pcc-icon-download").on("click", function (event) {
    $("div.pcc-select-download div.pcc-label").html("PDF");
    $("div[data-pcc-checkbox=\"burnMarks\"]").addClass("pcc-checked");
    $("button[data-pcc-download=\"download\"]").click();
});

This will add a new click listener to the download button. In the example above, the click listener sets download parameters (type is set to “PDF”, and marks/redactions/esignatures are included), and then immediately calls the click event on the “download” button that would normally be in the download pane. This should make it so that when the user clicks the download button, the notification dialog immediately appears instead of the download pane, as shown below:

From here the user can click the “save” button to download the resultant document.

Question

ImageGear .NET v24.6 added support for viewing PDF documents with XFA content. I’m using v24.8, and upon trying to open an XFA PDF, I get a SEHException for some reason…

SEHException

Why might this be happening?

Answer

One reason could be because you need to execute the following lines after initializing the PDF component, and prior to loading an XFA PDF:

// Allow opening of PDF documents that contain XFA form data.
IImGearFormat pdfFormat = ImGearFileFormats.Filters.Get(ImGearFormats.PDF);
pdfFormat.Parameters.GetByName("XFAAllowed").Value = true;

This will enable XFA PDFs to be opened by the ImageGear .NET toolkit.

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

When viewing documents using Internet Explorer 11, we are noticing an abnormally high CPU utilization. It gets worse when zooming in up to 800% through the PrizmDoc Viewer. It only seems to happen on certain machines. Why might this be happening?

Answer

A possible factor for this type of performance issue can potentially be corrected by enabling Internet Explorer’s hardware acceleration feature.

This feature can be enabled or disabled with the following steps:

  1. Open Internet Explorer 11, click on the Tools icon, and select Internet Options.
  2. Navigate to the Advanced tab and enable the Use software rendering instead of GPU rendering option.
  3. Click Apply and restart the browser.
Question

Which databases types are supported by PrizmDoc for storing annotation/redaction layers as well as viewing package information?

Answer

PrizmDoc provides the option to store viewing package process and creation information, as well as annotation layer JSON information, into a database.

Currently, Microsoft SQL Sever and MySQL is supported for this type of storage. For more information on setting up a database for use with PrizmDoc, please refer to the following documentation:

https://help.accusoft.com/PrizmDoc/latest/HTML/webframe.html#run-database-scripts.html.

https://help.accusoft.com/PrizmDoc/latest/HTML/webframe.html#developer-guide.html.

Question

We are running PrizmDoc on a Windows operating system and we noticed that our ms-office-conversion-service remained unhealthy even through a restart of the service. We also noticed an error in the MsOfficeConverter.log referencing the following error. What could be the cause?

“WARN – COM error occurs on 1 initialization attempt. Retrieving the
COM class factory for component with CLSID
{000209FF-0000-0000-C000-000000000046} failed due to the following
error: 80080005 Server execution failed (Exception from HRESULT:
0x80080005 (CO_E_SERVER_EXEC_FAILURE))”

Answer

The PrizmDoc MSO feature requires either Microsoft Office 2013 or 2016 to be installed in order to function properly. Based on the error, there is a Microsoft Office specific .dll file which is not registered properly.

The following process will re-register the .dll files and potentially resolve this issue (Note: for Step 2, this may vary depending on what directory you used to install Microsoft Office and the version of Office. You want to find the directory containing winword.exe):

  1. Run Command Prompt as Admin.
  2. Type cd C:\Program Files\Microsoft Office\Office15 or cd C:\Program Files\Microsoft Office\root\Office16
  3. Run winword.exe -regserver.
  4. Reboot the server.

If you don’t have the Prizm service set up to run on boot then make sure that Office applications are started by PrizmDoc, or from the command line, before being opened manually.