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
With PrizmDoc, how can I hide a predefined search if there are no results?
The predefined search option does not support that functionality, but you can instead perform a server-side search, and then activate the search panel if there are results to show:
var viewer; var viewingSessionId = <%= viewingSessionId %>; var fixedSearchTerm = "the"; var pasUrl = "/pas"; var viewerReady = false; var searchReady = false; var searchDisplayed = false; function displaySearchIfNeeded() { // The search is only displayed once the viewer is ready, and once our preliminary server-side search comes back positive. if (viewerReady && searchReady && !searchDisplayed) { searchDisplayed = true; $("[data-pcc-search=\"input\"]").val(fixedSearchTerm); $("[data-pcc-search=\"submit\"]").click(); } } function sendSearchPost() { $.ajax({ "method": "POST", "url": pasUrl + "/v2/viewingSessions/" + viewingSessionId + "/searchTasks", "data": JSON.stringify({ "input": { "searchTerms": [ { "type": "simple", "pattern": fixedSearchTerm, "caseSensitive": false, "termId": "0" } ] } }), "contentType": "application/json", "success": function(response) { $.ajax({ "url": pasUrl + "/v2/searchTasks/" + response["processId"] + "/results?limit=1", "success": function(response) { if (response.results.length !== 0) { searchReady = true; displaySearchIfNeeded(); } }, }); }, "error": function(jqXHR, textStatus, errorThrown) { if (jqXHR.status === 480) { setTimeout(sendSearchPost, 2000); } } }); }; setTimeout(sendSearchPost, 500); $(document).ready(function() { // Since we are no longer restricted to a predefined search, we can load the viewer ASAP. viewer = $("#viewer").pccViewer({ "documentID": viewingSessionId, "imageHandlerUrl": "/pas", "language": viewerCustomizations.languages["en-US"], "template": viewerCustomizations.template, "icons": viewerCustomizations.icons }); viewer.viewerControl.on("ViewerReady", function(event) { viewerReady = true; displaySearchIfNeeded(); }); });
When viewing .csv files in PrizmDoc Viewer, the dates in the CSV file are in UK format (DD/MM/YYYY). However, if the DD is lower than 13 it is converted to US date format (MM/DD/YYYY).
Workaround:
The suggested workaround is to use Excel files instead of CSV to avoid this situation. Excel file format stores date/time format in the file.
Issue:
This is a bug in the MS Excel COM Interop that is being used by the product (MsOfficeConverter). Here is the related Excel bug: https://social.msdn.microsoft.com/Forums/vstudio/en-US/82248560-dabd-4c90-b1e2-793b2f32b257/excel-bug-handling-dates-in-csv-files-using-microsoftofficeinteropexcel?forum=exceldev
Problem description:
When using MS Excel Interop to open CSV files, all date/times there are being interpreted with “en-US” locale, regardless of actual system locale. Here is the description from the bug link above:
Excel interpreting dates when its reads csv files via .NET Interop. It is not a excel formatting issue per say. When excel accesses information such as dates (which are stored as numbers in memory to support arithmetic operations) from text files, it has to convert the date from textual representation (within the csv file, such as 2012-09-12) to the equivalent number in Excel memory (e.g. 41164 which represents 2012-09-12). When we use Interop to access this number in memory, many are interpreted incorrectly – swapping days with months and vice versa. This is a bug, as Excel is not abiding by the system culture on interpreting local date formats.
When looking at the configuration files for both PAS (pcc.win.yml, pcc.nix.yml) and PrizmDoc Server (prizm-services-config.yml), there appear to be similar settings for Viewing Session timeouts: defaults.viewingSessionTimeout (PAS) and viewing.sessionLifetime (Server). What is the difference between the two?
The difference is as follows:
PAS
defaults.viewingSessionTimeout
This setting is used when the viewing session POST requests use source.type="viewingPackage".
POST
source.type="viewingPackage"
Prizm Server
viewing.sessionLifetime
This setting is used for all other viewing session POST requests.
When loading PDF documents into PrizmDoc that contain embedded highlights, rather than appearing translucent, the highlights are appearing opaque and are covering the underlying text. Why is this happening?
Prior to version 13.4 of PrizmDoc, this was occurring due to limitations in web browsers. The SVG attribute comp-op="multiply" was not widely supported in modern browsers.
comp-op="multiply"
With PrizmDoc version 13.4, the way highlights were rendered was changed to resolve this issue.
When printing non-standard size raster images with PrizmDoc they can sometimes become cutoff if too tall or wide. How can I correctly print a non-standard size raster image with PrizmDoc?
(This explanation is done for a tall portrait image, but can be altered to work for a wide landscape image by flipping the width and height.)
To do this, you have to add a custom paper size to viewerCustomization.js and specify a smaller width so that there is enough room to fit the height of the image on a single page.
To find the correct width value so that the image will fit on a single page, you will need to do some math. In this example, we’ll use an image that is 1305×2823. In this case, the width is 46.2% of the height. If you want to print onto 8.5×11 inch paper, then the width you want to set for your new custom paper size is 11*0.462, which comes out to 5.082.
So now that you have the width, you need to create the new custom paper size. In viewerCustomization.js in the templates section, find the "print" template and add the following code where the other printing paper sizes are located.
/*custom */ .portrait .custom.page { width: 5.082in; height: 11in; margin: 0 auto !important; } .portrait .custom.pageIE { width: 9.5in; height: 9.5in; margin: 0 auto !important; } .portrait .custom.pageSafari { width: 8.9in; height: 8.9in; margin: 0 auto !important; } .portrait .custom.nomargins { width: 11in !important; height: 11in !important; } /* even without margins, Safari enforces the printer's non-printable area */ .portrait .custom.nomargins.pageSafari { width: 9.32in !important; height: 9.32in !important; } .landscape .custom.page { height: 5.082in; width: 11in; margin: 0 auto !important; } .landscape .custom.pageIE { height: 9.05in; width: 9.05in; margin: 0 auto !important; } .landscape .custom.pageSafari { height: 8.4in; width: 8.4in; margin: 0 auto !important; } .landscape .custom.nomargins { height: 11in !important; width: 11in !important; } .landscape .custom.nomargins.pageSafari { height: 9.32in !important; width: 9.32in !important; } /*custom end*/
As you can see, the width for .portrait .custom.page was set to 5.082in, and the height set to 11in. This will scale the 1305×2823 image to fit on a single 8.5×11 page when printing. By flipping the values and setting them in .landscape you would be able to print a 2823×1305 image on a single landscape page. (Just to note, I only edited the values for .custom.page for portrait and landscape. The others would most likely need to be changed.)
.portrait .custom.page
.custom.page
Next you need to add an option for your new paper size to the "paperSize" selection tag in the "printOverlay" section of templates in viewerCustomization.js. Your select tag should end up looking something like this:
<select data-pcc-select="paperSize" class="pcc-print-select"> <!-- US and International--> <option value="letter"><%= paperSizes.letter %></option> <option value="legal"><%= paperSizes.legal %></option> <option value="tabloid"><%= paperSizes.tabloid %></option> <option value="foolscap"><%= paperSizes.foolscap %></option> <!-- A formats--> <option value="a3"><%= paperSizes.a3 %></option> <option value="a4"><%= paperSizes.a4 %></option> <option value="a5"><%= paperSizes.a5 %></option> <!-- Architectural--> <option value="a6"><%= paperSizes.a6 %></option> <option value="a"><%= paperSizes.a %></option> <option value="b"><%= paperSizes.b %></option> <option value="c"><%= paperSizes.c %></option> <option value="d"><%= paperSizes.d %></option> <option value="e"><%= paperSizes.e %></option> <option value="e1"><%= paperSizes.e1 %></option> <option value="custom">Custom</option> </select>
The new print option should now appear in the PrizmDoc print settings when selecting a paper size, and it should print the image on a single page.
One thing to note is that you will have to do this for each differently sized image. If you are unsure of the size of uploaded documents, this solution will most likely not be usable.
In PrizmDoc, why can’t I delete a full page redaction? The menu pops up for a rectangle redaction, so why not for a full page?
First, some terminology for PrizmDoc Viewer menus:
Traditionally, when you right click on a page, application, etc. the menu that pops up is called the “context menu”. However, in PrizmDoc, we refer to that menu as the Immediate Actions Menu, and there is a larger box that appears off to the side that we call the Context Menu.
Immediate Actions Menu
Context Menu
This functionality is viewable in the demo linked below. When you create a full page redaction and right-click on it, you get the Immediate Actions Menu. When you create a rectangle redaction and left- or right-click on it, off to the side you’ll see the Context Menu, and can delete it using either that menu or the “delete” key.
https://www.accusoft.com/demos/redaction-demo/
When you make a full page redaction, the only way to delete it is by using the delete button in the Immediate Actions Menu. You cannot click on it and press “delete”, and you cannot delete it via our Context Menu. This is currently a design feature being discussed below at the time of writing:
https://ideas.accusoft.com/ideas/PDEN-I-512
By default, the parameter immediateActionMenuMode is set to off, which disables the menu. If you are having trouble getting this menu to open in your application, you may need to set it to be on when you have a redaction on the page. You can read more about enabling and disabling this feature here.
immediateActionMenuMode
off
on
If I upload an HTML document to PrizmDoc that has image tags in it, will those images be rendered in the Viewer or will only the text be displayed?
What if the image tags are referencing local images?
When loading an HTML file, PrizmDoc will render image tags that are sourced from publicly accessible URLs. The relative links may not render though, as it’s likely that the source will not be found.
In PrizmDoc 13.2, a server-side configuration option called:
security.htmlRendering.blockExternalContent
was introduced to control whether or not externally-referenced HTML content will be blocked.
See the release notes for more information.
With PrizmDoc Viewer, can I have more than a single viewer on the same page?
Yes, just initialize a second viewer on another <div> in the page. You can use the initialization code here more than once within the same page.
<div>
By default, in the PrizmDoc Viewer, links are highlighted and underlined in blue. To follow links within a document, the user needs to click the link, wait for the floating popup to appear showing the link’s target URL, and then click that to actually follow the link. Is there a way to make this a single-click process and skip the floating popup?
The desired one-click functionality can be achieved by modifying the viewer.js source file:
viewer.js
Inspect around line ~9457; you’ll find the following else if block:
else if
} else if (ev.targetType === "documentHyperlink") { hyperlinkMenuHandler(ev, "view"); }
This line of code executes when the user clicks on a link displayed within the Viewer. The call to hyperlinkMenuHandler is responsible for displaying the floating popup. If you’d like to immediately open the link in a new window/tab instead, replace the contents of the “if else” block with a call to window.open:
hyperlinkMenuHandler
window.open
} else if (ev.targetType === "documentHyperlink") { window.open(ev.hyperlink.href, '_blank'); }
This will allow hyperlinks that appear in the Viewer to be followed in a new window/tab with a single-click.
Why am I seeing requests sent through pcc.ashx when they shouldn’t be?
The default option for the imageHandlerUrl is pcc.ashx so if, for instance, you misspelled imageHandlerUrl or in some other way do not have the setting properly implemented, you will see requests sent through pcc.ashx.
imageHandlerUrl
This has been seen when trying to set up the pas-service reverse proxy redirect for Prizm Application Services (PAS).
A sample implementation of this setting can be found in the viewer.js around line 288.
options.imageHandlerUrl = options.imageHandlerUrl || "../pcc.ashx";
When using the PrizmDoc samples, the sample documents included are taking close to 1 minute to load in the viewer. The same also happens when uploading files into the sample.
The server processes are showing minimal impact on CPU and memory. However, the hard drive was spiking to 100% utilization sporadically.
We have found that Windows Defender with enabled Real-Time scanning can significantly impact performance. Once Real-Time scanning was disabled, we found this issue to be immediately resolved.
To disable Windows Defender, you can do the following:
Control Panel
Windows Defender
Settings
Off
In PrizmDoc, my text annotation won’t fit the bounding box as if there is padding on the text. How can I fix this?
Check to see if there’s any custom styling to the body tags. If you have any sort of padding applied to the "body" element in the CSS, it may affect the text annotation, which is a foreign object with a body tag in it.