Technical FAQs for "PrizmDoc"

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.

Question

When deleting a Viewing Session, does the backend conversion stop?

Answer

No, the backend conversion will continue even after a Viewing Session is deleted.

Question

Why are the fonts in my CAD files showing up garbled/unrecognizable/not as expected?

Answer

Some CAD files may include fonts that are not included in PrizmDoc Viewer’s default font set. PrizmDoc will choose the most appropriate substitute font to use in its place. The substitution process isn’t always perfect, and as a result, you will see garbled/unrecognizable characters in the Viewer.

In order to provide additional fonts for PrizmDoc to pull from,

Some CAD/DWG files may include fonts that are not included in PrizmDoc Viewer’s default font set. PrizmDoc will choose the most appropriate substitute font to use in its place. The substitution process isn’t always perfect, and as a result, you will see garbled/unrecognizable characters in the Viewer.

In order to provide additional .SHX fonts for PrizmDoc to pull from, you can copy the necessary .SHX font files into the cad-fonts folder, located at:

Windows: ‪C:\Prizm\modules\cad-fonts
Linux: /usr/share/prizm/modules/cad-fonts

Alternatively, if you want to use fonts from that are located in a different directory, you can add the environment variable, ACAD, to explicitly specify the filepath of these fonts. his variable can be added under System Properties > Advanced > Environment Variables > System Variables > New... > ACAD. For the variable’s Value, specify a folder path that contains additional CAD font files for PrizmDoc to pull from.

* It is important to note that the Linux filesystem is case-senstive, so when adding custom CAD fonts on Linux, make sure that the fonts are named with case-sensitivity in mind. If you still see unexpected output after adding the fonts to the cad-fonts folder, try renaming the fonts to all lowercase.

** Note that the cad-fonts folder was added in PrizmDoc 13.20, so to add custom cad fonts on earlier versions of Prizm, use the environmental variable approach.

you can add the environment variable, ACAD.
This variable can be added under System Properties > Advanced > Environment Variables > System Variables > New... > ACAD. For the variable’s Value, specify a folder path that contains additional CAD font files for PrizmDoc to pull from.

Question

I want to load an HTML document in PrizmDoc with UTF-8 encoding. Can this be done automatically in the product?

Answer

Currently, no. We have a parameter for .txt files which does that (detailed here), but this “textFileEncoding” intentionally only works for .txt, not .html files. There is a feature request for this:

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

In the meantime, this can be fixed manually by adding charset = “utf-8” to the meta tag of the HTML document. One POC way this might be done programmatically is below in Python 3.7 (need obvious polishing like checking for the tag already existing, multiple “meta” tags, etc):

with open(filename, "r") as file:
    content = file.read()

index = content.find("meta") + len("meta")

new_content = content[:index] + " charset=\"utf-8\" " + content[index:]

with open(filename, "w") as file:
    file.write(new_content)
Question

How can I annotate or redact search results within PrizmDoc? What annotation or redaction types are supported? How can I change the properties of the created marks?

Answer

You can annotate or redact search results using the addMarkFromSearchResult() function from ViewerControl. This function creates a new mark of a specific type and adds it to the location where the specified search result is.

The addMarkFromSearchResult() supports mark types: TextSelectionRedaction, HighlightAnnotation, StrikethroughAnnotation and TextHyperlinkAnnotation.

The addMarkFromSearchResult() function takes two arguments: searchResult and markType. The searchResult is the search result that you want to annotate/redact and markType is the type of mark that will be created.

To perform a search and redact the search results, use the following example:

var requestObject = PCCViewer.search('Con');
 var marks = [];
 var mark;
 requestObject.on(PCCViewer.EventType.SearchCompleted, function (event) {
     var searchResults = event.completedSearchResults;
     for (var i = 0; i < searchResults.length; i++) {
         mark = viewer.viewerControl.addMarkFromSearchResult(searchResults[i], PCCViewer.Mark.Type.TextSelectionRedaction);
         marks.push(mark);
     }
 });

To create a different annotation type from a search result you would change the second argument to the different type. For example, if you wanted a textHyperLinkAnnotation you could do the following:

mark = viewer.viewerControl.addMarkFromSearchResult(result, PCCViewer.Mark.Type.TextHyperlinkAnnotation);

Changing the properties of the mark is fairly straightforward. To set the fill color and the URL string in the TextHyperlinkAnnotation, you would add this after creating the mark:

mark.setHref("https://www.accusoft.com");
mark.setFillColor("#FF0000");

More information on mark types and their properties can be found in our documentation here.

Question

In PrizmDoc, I can get the coordinates of a Click event. However, this corresponds to the window coordinates of my viewer. How can I translate this to coordinates of the actual page?

Answer

As specified in our documentation here, PrizmDoc offers the following method:

convertPageToWindowCoordinates(pageNumber, points)

This appears to do the opposite of what we want: it takes in a page number and coordinates of the page, and converts them and outputs window coordinates. However, we can use this to get what we want. Suppose we test coordinates (0,0) of the page, we should get:

Page: (0,0)
Window: (0,0)

Now let’s test point (0,1) of the page, let’s call this a “Unit Distance”. Suppose we get back:

Page: (0, 1)
Window: (0, 5)

If the function gave us this, then we know that the coordinate transformation along the Y-axis is a factor of 5. Now whenever we want to know the correct image coordinate, we can simply divide our window’s Y coordinate by 5. Programmatically, you should be able to take the information from the Unit Distance in both the X and Y axis, and create a function in which you input Window Coordinates and output Page Coordinates.

Question

We are in the process of converting multiple Microsoft Office documents to PDF files and noticed a few PowerPoint files are returning the following:

“errorCode”: “CouldNotConvert”.

What could be causing this issue?

Answer

This issue can occur specifically with PowerPoint files when using PrizmDoc’s MSO feature or PrizmDoc Cloud. When a document is marked as final, it becomes non-editable and the MS Office API does not allow the document to be edited and returns “errorCode”: “CouldNotConvert”.

Currently the only work around is to open the PowerPoint file in its native application and remove the Mark as Final flag and save the file.

At the time of writing, there exists a pending feature request for the ability to remove this flag automatically. The feature request can be seen here.

Question

I have a document with text on it. I want to find the coordinates of a particular word on it (so I can place annotations, redactions, etc.). How might this be accomplished?

Answer

To programmatically determine the location of text (for annotations, redactions, etc.), we can use the following GET request from the PrizmDoc Server API:

GET /PCCIS/V1/Document/q/{{PageNumberBegin}}-{{PageNumberEnd}}/Text

This GET request will give you the currently available text position metadata of the page, with the corresponding bounding boxes and coordinates (distance from the left/top edge, and width/height). You can then use these coordinates to place your annotations, redactions, etc.

Question

When viewing documents within the PrizmDoc Viewer using a particular browser, we are seeing garbage text. Viewing the same document with other browsers shows the text properly. What could be causing this to occur?

Answer

There are two possible causes for this in Internet Explorer 11 and you can check the settings below to potentially fix the issue:

In Internet Explorer 11 settings, ensure the Font Download option is enabled:

  1. Click on Internet Options.
  2. Select the Security Tab.
  3. Under Local Intranet zone, select Custom Level.
  4. Under Downloads, set Font download to Enabled.

Disable the “Turn off Data URI” support setting:

  1. Click Start, type gpedit.msc in the Start Search box, and then press Enter.
  2. In the navigation pane of the Local Group Policy Editor window, expand Computer Configuration > Administrative Templates > Windows Components > Internet Explorer > Security Features.
  3. In the right pane, double-click Turn Off Data URI support.
  4. Select Disable, click Apply, and then click OK.
  5. Go back to the navigation pane of the Local Group Policy Editor window, expand User Configuration > Administrative Templates > Windows Components > Internet Explorer > Security Features.
  6. Repeat steps 3 and step 4 above.

In Internet Explorer 11 settings, ensure Ignore font styles specified in webpages is not checked.

  1. Click on Internet Options.
  2. Select the General Tab.
  3. Click on Accessibility button.
  4. Un-check Ignore font styles specified in webpages.

In Chrome this is a bug that was found about 3 years ago and fixed in Chrome Canary, but not in Chrome Stable at the time:

https://productforums.google.com/forum/#!msg/chrome/rpmz56gnFKc/nPLtsbYZBwAJ

This may be why Chrome is having problems. Consider either updating Chrome Stable to the latest version or testing in Chrome Canary to see if that fixes the garbage character issues with that browser.


In Mozilla Firefox there is a setting you can enable which could resolve this problem in that browser:

  1. Go to Options/Preferences > General: Fonts & Colors > Advanced and select Allow pages to choose their own fonts (instead of My selections above).