Technical FAQs

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

I would like to be able to query my PrizmDoc Server for all documents currently in a state of processing. I want to be able to do this to determine if a document is “hanging” during conversion, to determine my system’s efficiency (My RAM and CPU are at X% with ten documents converting), or for other tasks. This is currently possible for individual processes if you know the process ID. Is this possible for all processes?

Answer

The current version of PrizmDoc does not have an API to determine if any file is currently converting on PrizmDoc Server. PrizmDoc provides viewingPackageCreator, contentConverter, redactionCreator, and markupBurner APIs that report the status of a specific process, and whether it is in progress or not. However, it is currently necessary to know a specific processId to obtain that information.

There is an active Feature Request for this item available for viewing here.

Question

Is it possible to only use PrizmDoc on an internal network? Does the product make attempts to connect to sites that are on the Internet? Does it try to reach Accusoft?

Answer

The only cases where PrizmDoc must be connected to the Internet are as follows:

  • If you are running the PLU in online mode.
  • If your PrizmDoc deployment uses cloud licensing. In this case, PrizmDoc requires Internet access to get to the S3 bucket.

Beyond these cases, PrizmDoc can be installed on an internal network and used normally.

Question

Can PrizmDoc handle password-protected files, such as PDFs or Excel files?
How would a user specify a password for a particular document?

Answer

It is possible to specify the password for a password-protected document when creating a viewing session in PrizmDoc. When sending a request to create a viewing session, you’ll use the password field in the request body to specify the password. For example…

POST http://localhost:3000/ViewingSession
Content-Type: application/json
{
    "source": {
        "type": "url",
        "url": "https://www.usability.gov/sites/default/files/creating-wireframes.pdf"
    },
    "password": "hunter2"
}

(Replace "hunter2" with the actual password)

Please note that even if a file needs a password and is not provided one (or is provided one that’s incorrect), the viewing session should still be created successfully. The easiest method to determine whether the password is needed/correct is to make a call to get the page. You can do this by making a GET request to the GetPage route using the viewingSessionId created earlier, like so…

GET pas_base_url/Page/q/0?DocumentID=u{viewingSessionId}

…be sure to replace pas_base_url with the root of your Prizm Application Services (PAS) instance (usually this is http://localhost:3000) and replace {viewingSessionId} with the actual value for viewingSessionId created in the previous step.

The above call will return 200 OK if the page load is successful. If a password is required/incorrect, you should see a return status code 480. There will be additional response headers called accusoft-status-number and accusoft-status-message, which should be 4001 and "Document requires a password", respectively.

You can see the above in greater detail in the product documentation here.

You can use this information to re-create a viewing session with the correct password.

Currently, there is a feature request planned for a potential future release of PrizmDoc to prompt the user for a password if one is required.

Question

PrizmDoc logs have timestamps, what timezone are they in?

Answer

PrizmDoc logs are timestamped in GMT, in the ISO 8601 standard.

Question

When I try to install PrizmDoc Server on Windows, my username/password are rejected as incorrect. How can I troubleshoot this?

Answer

It’s possible that there is some problem with the account you’re trying to log in under.

First, make sure the server is in the same domain as the username you login with. For example, if you are logging in under abc.com\flastname, ensure that your server is also a part of the abc.com domain.

Second, do a “whoami” from the command prompt – verify the id that comes up is in the local admins group (Control Panel -> All Control Panel Items -> Administrative Tools -> Computer Management -> Local Users and Groups -> Groups -> Administrators). You need to be a local admin in order to install the product.

Third, if none of the above work, you can type the password into Notepad and copy from Notepad into the installer. Sometimes the installer has difficulties with text copied directly from web browsers. Copying from Notepad resolves this issue.

If none of the above work, then as a workaround, try creating a new local account: (Settings App -> Accounts -> Other People -> “Add someone else…” -> “I don’t have this person’s sign-in information” -> “Add a user without a Microsoft account”) You can then enter the new credentials you just created into the PrizmDoc installer. Once the services are running, you can change the login information back to the desired administrator account (Services -> Prizm (Double click) -> Log on -> This account). You’ll want to repeat this for all three services (Prizm, Prizm Application Services, and PrizmDemo).