Join us for an engaging webinar, as we unravel the potential of AI for revolutionizing document management.
Watch Now
Enable your employees to remain productive throughout the document management process.
Read More
Learn how SmartZone uses a regular expression engine integrated into the recognition engine to achieve the best possible accuracy on data that can be defined by a regular expression.
Docubee is an intelligent contract automation platform built to help your team success
Why are the fonts in my CAD files showing up garbled/unrecognizable/not as expected?
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
C:\Prizm\modules\cad-fonts
/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.
ACAD
System Properties > Advanced > Environment Variables > System Variables > New... > ACAD
Value
* 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.
I want to load an HTML document in PrizmDoc with UTF-8 encoding. Can this be done automatically in the product?
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)
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?
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.
addMarkFromSearchResult()
ViewerControl
The addMarkFromSearchResult() supports mark types: TextSelectionRedaction, HighlightAnnotation, StrikethroughAnnotation and TextHyperlinkAnnotation.
TextSelectionRedaction
HighlightAnnotation
StrikethroughAnnotation
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.
searchResult
markType
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:
textHyperLinkAnnotation
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.
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?
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.
I have already licensed PrizmDoc. Where can I find my license key?
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:
prizm-services-config.yml
C:/Prizm/
/usr/share/prizm/
######################### PrizmDoc Configuration ############################### ############################### Licensing ###################################### license.solutionName: ________ license.key: 2.0...
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?
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.
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?
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
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?
To programmatically determine the location of text (for annotations, redactions, etc.), we can use the following GET request from the PrizmDoc Server API:
GET
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.
How can I get a document’s dimensions with PrizmDoc?
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:
requestPageAttributes()
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”.
contentType
How can I remove the scroll bar/disable scrolling in PrizmDoc Viewer?
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');
No matter what CSS I use, the viewer’s div always consumes the full screen. How can I fix it?
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.
fullScreenOnInit: true
After searching a document, an error icon appears in the search results panel. Clicking on it displays the following error message: “x page(s) cannot be searched.” Why does this occur and how can I find out which specific pages couldn’t be searched?
When the PrizmDoc Viewer text-service cannot find any text for a given page in the document, it provides an array of all the pages without text in the response from searchTask results.
searchTask
In short, the document is fine and simply contains pages without text. If you look at the pagesWithoutText array contained within the response data from searchTasks, you’ll see something like this:
pagesWithoutText
searchTasks
[0, 1, 7, 17, 43, 45, 65, 67, 77, 79,…]
The values reported are pages that do not contain any text but instead are either blank or contain an image. This data can then be used to inform the user of how many pages are not searchable.