Technical FAQs

Question

I have EML and MSG files that contain attachments. I want to combine the original EML/MSG document with each of its attachments into a single PDF. How can I do this?

Answer

To do this you are going to need to create a viewing session for the EML or MSG file. Once you’ve created the viewing session you can get the viewingSessionIds of the attachments. Once you have the viewingSessionIds you can get the workFile ID associated with each viewing session. With the workfile IDs you can use the Content Conversion Service (CCS) to combine the email with its attachments into a single PDF.

Use the following API requests to do this:

Create a new viewing session with:

POST {server_base_url}/PCCIS/V1/ViewingSession 

This will give you a viewingSessionId which will be used in future requests.

The body for this request will be JSON:

    {
        "render": {
            "html5": {
                "alwaysUseRaster": false
            }
        }
    }

Upload the document with:

PUT {server_base_url}/PCCIS/V1/ViewingSession/u{viewingSessionId}/SourceFile?FileExtension={extension} 

The request body must be bytes of the source document. Make sure to include the FileExtension or PrizmDoc won’t be able to detect the file as an EML or MSG file.

Poll for and get the viewingSessionIds of the attachments with:

GET {server_base_url}/PCCIS/V1/ViewingSession/u{viewingSessionId}/Attachments

This will return the viewingSessionIds for each of the attachments.

Get the workfile ID for each of the viewing sessions with:

GET {server_base_url}/PCCIS/V1/ViewingSession/u{viewingSessionId}/FileId 

You’ll need to get a fileId for each attachment’s viewingSession and the email’s viewingSession.

With those workfile IDs, you can use the Content Conversion Service (CCS) to combine each of the workfiles with:

POST {server_base_url}v2/contentConverters

The body for this request will be JSON and need to include the workfileId for each of the attachments and the email itself. The body would look like this:

    {
        "input": {
            "sources": [
                { 
                    "fileId": "{EmailWorkFileId}"
                },
                { 
                    "fileId": "{Attachment1WorkFileId}"
                },
                { 
                    "fileId": "{Attachment2WorkFileId}"
                }
                
            ],
            "dest": {
                "format": "pdf"
            }
        }
    }

This will return a processId that you can poll using:

GET /v2/contentConverters/{processId}

Once the process is complete, the request will return a results array that will contain the fileId of the final document.

You can get the final document that contains all the attachments and original EML/MSG file combined into a single PDF with:

GET /PCCIS/V1/WorkFile/{fileId}

Barcode Xpress ImageGear .NET

Barcode Xpress and ImageGear .NET.  Barcode Xpress is a leading barcode reading SDK. While it supports a variety of image formats, Barcode Xpress works with ImageGear to support even more obscure image formats. For example, Barcode Xpress does not support reading barcodes on PDFs. Combined with ImageGear, developers can support a myriad of image formats and PDFs. With Barcode Xpress & ImageGear working together, developers can integrate a barcode reader that can detect barcodes on almost any kind of document.

Barcode Xpress accepts images in multiple different object types, such as System.Drawing.Bitmap. Using the method ImGearFileFormats.ExportPageToBitmap we can easily take any image that ImageGear supports and export it to a System.Drawing.Bitmap object that we can then pass to Barcode Xpress. So, only a tiny amount of code is required to recognize barcodes with ImageGear .NET and Barcode Xpress. Below, we’ll show various ways to pass different types of images and documents to Barcode Xpress.


Image:

// Load the image into the page.
ImGearPage imGearPage = ImGearFileFormats.LoadPage(stream, 0);

// Export the image to a bitmap and pass that bitmap to Barcode Xpress
 Result[] results = barcodeXpress.reader.Analyze(ImGearFileFormats.ExportPageToBitmap(imGearPage));


PDF:

We need slightly more code for a PDF. First, we specify a page number when calling LoadPage. Second, we must dispose of the ImGearPage object after we’re done with it. 

// Load the specified page of the PDF as an ImGearPage object
ImGearPage imGearPDFPage = ImGearFileFormats.LoadPage(stream, pageNumber);

// Export the image to a bitmap and pass that bitmap to Barcode Xpress
Result[] results = barcodeXpress.reader.Analyze(ImGearFileFormats.ExportPageToBitmap(imGearPDFPage));

(imGearPDFPage as IDisposable).Dispose();

Now that we’ve explained the most important part, we’ll show you a simple console app that recognizes barcodes on a PDF using the method above. 

The code below assumes you’ve installed an evaluation or development license for both Barcode Xpress and ImageGear .NET.

using System;
using System.IO;
using Accusoft.BarcodeXpressSdk;
using ImageGear.Core;
using ImageGear.Evaluation;
using ImageGear.Formats;
using ImageGear.Formats.PDF;

namespace BXandIGDotNet
{
	class Program
	{
    	static int pageNumber = 0;
    	static string fileName = @"Path/To/Your/PDF..pdf";
    	static void Main(string[] args)
    	{
        	// Initialize evaluation license.
        	ImGearEvaluationManager.Initialize();

        	// Initialize common formats.
        	ImGearCommonFormats.Initialize();
        	// Add support for PDF and PS files.
        	ImGearFileFormats.Filters.Insert(0, ImGearPDF.CreatePDFFormat());
        	ImGearFileFormats.Filters.Insert(0, ImGearPDF.CreatePSFormat());
        	ImGearPDF.Initialize();

        	using (FileStream stream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read))
        	using (BarcodeXpress barcodeXpress = new BarcodeXpress())
        	{
            	// Load the specified page of the PDF as an ImGearPage object
            	ImGearPage imGearPDFPage = ImGearFileFormats.LoadPage(stream, pageNumber);

            	// Export the image to a bitmap and pass that bitmap to Barcode Xpress
            	Result[] results = barcodeXpress.reader.Analyze(ImGearFileFormats.ExportPageToBitmap(imGearPDFPage));

            	(imGearPDFPage as IDisposable).Dispose();

            	// Print the values of every barcode detected.
            	for (int i = 0; i < results.Length; i++)
            	{
                	Console.WriteLine("#" + i.ToString() + " Value: " + results[i].BarcodeValue);
            	}
            	Console.ReadKey();
        	}
    	}
	}
}

Using Barcode Xpress and ImageGear in Other Languages & Linux

You can also use Barcode Xpress and ImageGear together outside of the .NET framework. Barcode Xpress supports several different programming languages and frameworks including .NET Core, Java, NodeJS, Python, C, and C++. All of which can be used on Linux. 

ImageGear for C/C++ also supports Linux. Barcode Xpress Linux, which is a C/C++ library, ships with a sample called “ReadBarcodesIG”, that shows how to integrate Barcode Xpress Linux and ImageGear for C/C++. You can find the sample code after downloading our SDK here! For more information on Barcode Xpress, visit our Developer Resources page on the website. In addition, you can also find more information about ImageGear .NET on its respective Developer Resources page as well.

Question

When selecting download and including annotations, the resulting PDF does not include the comments. How can we obtain the file as a PDF with the annotation comments included?

Answer

By design, when using the download button, the comments to the annotations are not included in the download.

Workaround

  1. Under the View tab, select Print.
  2. From the Print dialog, select the More options drop-down.
  3. Under the Comments section, select either After Each Page or At End of Document.
  4. When selecting a printer, use the Print to PDF option and it will create a PDF with the comments included.

Redacting documents is critically important for legal departments and government agencies. By removing sensitive information from a digital file before sharing it publicly, it’s possible to protect private data or classified materials from being exposed. 

In the days before digital documents, redaction involved a simple, if crude, process of covering text with a black marker. Since redactions were done by hand, it was easy for mistakes to be made, which could range from using insufficiently dark ink to leaving portions of text exposed. The development of high-powered photo enhancement has rendered this approach all but useless, as even inexpensive image processing technology can distinguish blacked-out text.

With the transition to digital documents, organizations finally have access to true redaction capabilities. Unfortunately, they still tend to make mistakes when it comes to flattened PDFs that could leave redacted context exposed and vulnerable.

What Is a Flattened PDF?

A modern PDF file consists of multiple layers, each of which can contain separate elements. One layer might feature text, another image, and yet another a fillable form. The flattening process removes all interactive elements from form fields and combines all of the document’s elements into a single layer. 

Organizations frequently used this process to “lock in” form content to prevent anyone from altering the information after a user completes the forms. It also removes elements like dropdown selections within form fields and can burn in other annotations or markups, making them a permanently visible element of the document.

Flattened PDF Redactions

Unfortunately, simply flattening a PDF is usually not sufficient to securely redact a document. That’s because obscured elements are still present in the document; they’re just not visible when the file is viewed and printed. 

Recovering improperly redacted content is actually quite trivial in many cases. Two of the most infamous recent examples include information released during the investigation of political campaign chairman Paul Manafort in 2019 and court documents related to Facebook’s use of personal data in 2017. In both cases, journalists were able to copy redacted text from PDF files and paste it into a text editor to reveal the obscured content.

There are typically two ways that improper redactions occur:

  1. Covering Text with Boxes: This frequent mistake occurs when people try to treat a digital document like a physical piece of paper. They place annotations over the sensitive content, usually in the form of a black box, and then save a flattened version of the PDF thinking that no one will be able to separate the text from the annotation element. As the Manafort and Facebook cases demonstrate, however, getting around these “redactions” is usually quite easy.
  2. Changing the Color of Text: Another common redaction error involves altering the color of the sensitive text to match the document background. Changing the text color to white, for instance, might make it invisible to the human eye, but it does nothing to alter the content itself. The text can be made visible again by using the copy/paste trick described above or by altering the background characteristics in another program. 

The only way to make these methods viable for true redactions would be to actually print the documents with the content hidden and then scan them back into digital form, where OCR could be used to reconstruct a new file. But even in this case, there’s a chance that a powerful OCR engine might be able to pick up the hidden elements.

Using Proper Redaction Prior to Flattening with PrizmDoc Viewer

In order to redact documents securely, applications need to have access to specialized redaction tools that are capable of actually removing content from the document itself before applying redaction indicators. PrizmDoc Viewer’s redaction API can find and extract key text while also providing single or multiple reasons for the removal. 

This not only allows organizations to redact documents quickly, but it also ensures that the redacted information won’t be exposed later because it no longer even exists within the document. More importantly, the outputted document is entirely new, so there is no deleted information to recover. 

While most people are familiar with the distinctive black bars that indicate redacted content, even this leaves behind significant context clues that could provide hints of what was removed. Consider, for instance, a document involving multiple parties where the names of conversation participants have been redacted.

The following information:

PDF Redaction

The length of the redaction, then, would at least indicate when the redaction did not involve one person or the other. There are also many instances involving government documents where the length of the redacted information in classified material might suggest its relevance or importance.

When it comes to GovTech applications that need to remove large portions of information for security reasons, it often helps to perform redaction BEFORE turning a document into a flattened PDF. The PrizmDoc Viewer redaction API can be used to quickly extract text from a document and then redact it as a plain text file

Unlike a static PDF document, plain text accounts for width variations, so all redactions can be replaced with a standardized <Text Redacted> marker that makes it impossible to know the length of the redacted content. The text could then be converted into a PDF after the redaction process is complete.

Take Control of PDFs with PrizmDoc Viewer

As a fully-featured HTML5 viewer, Accusoft’s PrizmDoc Viewer delivers powerful viewing, annotation, and conversion functionality to your web application. It provides a broad range of redaction capabilities that allow legal, financial, and government organizations to keep their sensitive data secure and protect their customers. 

By integrating these complex features into your applications, you can focus your development efforts on building the tools that set your solution apart from the competition while our proven technology powers your customers’ viewing and redaction needs. To learn more about PrizmDoc Viewer’s powerful capabilities, download a free trial and test how it can support and enhance your application.

Question

We are planning to upgrade our PrizmDoc Server and PrizmDoc Client to the latest major version. What is the best practice for doing so?

Answer

For best results, you will want to follow the instructions below to ensure the cleanest upgrade of the newest version:

NOTE: Before starting, make a backup of the following configuration files for use as reference when re-configuring your new version installation. This should be done before the PrizmDoc installer is run, as all configuration files will be replaced with new ones (resetting them to their default configuration).

  • Prizm Server Configuration: prizm\prizm-services-config.yml

  • Prizm Client Configuration (Windows): prizm\pas\pcc.win.yml

  • Prizm Client Configuration (Linux): /usr/share/prizm/pas/pcc.nix.yml

  • ServiceHost Configuration: prizm\PCCIS\ServiceHost\pcc.config

How To:

  1. Uninstall the previous version of PrizmDoc Server and PrizmDoc Client. Be sure to delete all PrizmDoc folders that are still present. For Windows you can Find PrizmDoc Server and Prizm Client under Add/Remove Programs. For Linux, please follow instructions below for uninstall instructions.

Linux Prizm/PAS Service Uninstall:

https://help.accusoft.com/PrizmDoc/latest/HTML/webframe.html#linux-uninstall-prizmdoc-serve.html

https://help.accusoft.com/PrizmDoc/v13.10/HTML/webframe.html#pas-linux-uninstallation.html

  1. Download the latest version of PrizmDoc for your operating system from https://www.accusoft.com/products/prizmdoc-suite/prizmdoc-viewer-builds/

  2. Install PrizmDoc Server first and then the PrizmDoc Client.

  3. At the end of the server installation, the install may request a reboot.

  4. Make a backup of your new configuration files as listed above.

  5. Modify each of the new configuration files and make the same changes as you did in the older configuration files.

NOTE: Do not just replace the new configuration files with the old version configuration files, as new configurations may have been introduced in the new version and they would be lost.

  1. Restart the Prizm Services and Prizm Application Services to ensure the newly configured file changes take affect.

NOTE: If either service fails to start with an error after modifying the configuration files, replace the configuration files with the original copy of the configuration files and try making the changes again.

NOTE: If you are using viewing packages and have an existing database, we provide additional scripts in the \prizm\pas\db folder to modify your existing database. For example, upgrading from PrizmDoc 12.x to PrizmDoc 13.x we provide an additional script addTenantId to add a new field to one of the existing tables.

PrizmDoc Hybrid Viewing

Today’s customers expect more out of their software applications. No one wants to waste time juggling between multiple platforms every time they need to open a simple document. They want applications to provide a streamlined user experience that allows them to interact with various file formats quickly and easily, with minimal performance issues.

Most software developers turn to third party integrations like Accusoft’s PrizmDoc to incorporate document processing capabilities into their applications. Since developers are frequently pressed for time and resources, it doesn’t make sense to build document lifecycle features from scratch when they can easily deploy a proven, scalable solution that provides all the tools they need. An API-based integration like PrizmDoc can quickly add industry-leading viewing, editing, collaboration, conversion, and assembly features to an application, which allows developers to focus on other features that will help their software stand out from competitors.

Pros and Cons of Server-Side Viewing

All that document processing power has to come from somewhere, and in the case of solutions like PrizmDoc, most processing is handled by a dedicated server. The server may be self-hosted on the developer’s local infrastructure, a dedicated private cloud, or a public cloud that’s shared by multiple customers.

There are plenty of advantages to this model. Scalable infrastructure is available for the heaviest document processing workloads, but customers only have to pay for the resources they actually use. A dedicated server also makes it easy for applications to manage document storage and avoid version confusion.

Server-side resources can also pose challenges for some applications. If the server is constantly being used to prepare and render documents for viewing, customers may find themselves utilizing more processing resources than expected. Scaling viewing capabilities for multiple users can increase resource usage because each session places additional processing requirements on the server, especially if users need to make annotations, redactions, or other alterations to files.

Viewing multiple, lengthy files server-side can also impact performance. PrizmDoc’s HTML5 viewer, for instance, converts and renders documents in SVG format. While this format offers outstanding quality and flexibility, load time may take longer and it also takes up server storage space.

Introducing PrizmDoc Hybrid Viewing

The new PrizmDoc Hybrid Viewing feature solves these challenges by offloading the processing work for viewing in PDF format to the end user’s device. This is a hybrid approach between server-side processing and client-side processing, with all of the viewing capabilities handled by the client-side device. This drastically reduces the server resources needed to prepare files for viewing, which translates into cost saving and improved performance. Since all viewing is handled by the browser on the client-side device, Hybrid Viewing offers much greater responsiveness for a better overall user experience.

For files not already in PDF format users can take advantage of the new viewing package which converts any file format to PDF. This not only allows documents to be viewed more quickly in the future, but also reduces server load and storage requirements.

5 Key Benefits of PrizmDoc Hybrid Viewing

The Hybrid Viewing feature works within PrizmDoc’s existing viewing package infrastructure, making it a simple and streamlined solution for both new and existing customers. Shifting viewing processing from the server to client-side devices provides applications with several important benefits.

1. Cost Savings

Transferring the processing work required for document viewing to an end user’s device reduces server workloads. Since customers pay for the server resources their applications utilize, minimizing server requirements for viewing can deliver significant cost savings over time.

2. Better Resource Management

All file types can be used with this new Hybrid Viewing feature. The new PDF viewing package pre-converts all file types into PDF only, rather than creating SVG files with large amounts of data. This saves both processing time and storage resources. Developers can take advantage of this flexibility and resource savings to implement additional application features that leverage PrizmDoc’s capabilities.

3. Increased Productivity

Shifting document viewing workloads to client-side devices allows applications to process, view, and manage multiple documents faster. This helps end users to do their jobs more efficiently and get greater value out of their applications.

4. Enhanced Performance

Hybrid viewing not only requires fewer resources, but files can be viewed and manipulated faster with enhanced responsiveness. For applications that need to provide editing features such as annotations, offloading processing to client-side devices minimizes load times and lag for a better overall user experience.

5. Scalable Document Viewing

By handling document viewing capabilities on local devices instead of the server, scaling capacity becomes far less resource intensive. File conversion only needs to be performed once, so adding more users doesn’t increase the overall server workload.

What Hybrid Viewing Means for PrizmDoc Users

The new Hybrid Viewing feature allows PrizmDoc users to get more out of their integration than ever before. For customers who have long relied on desktop-based PDF.js viewers due to concerns about server workload or performance, the Hybrid Viewing feature provides a localized viewing solution that streamlines their tech stack and leverages the full capabilities of PrizmDoc. By minimizing server requirements, developers can unlock the potential of their applications to scale their document lifecycle features without worrying of runaway costs.

Hybrid Viewing is available for PrizmDoc Server v13.15 or greater and can be used for self-hosted, private cloud-hosted, or public cloud-hosted deployments. To learn more about how it can provide the flexibility your application needs to scale with user demands, talk to one of our PrizmDoc specialists today.

Question

I am trying to deploy my ImageGear Pro ActiveX project and am receiving an error stating

The module igPDF18a.ocx failed to load

when registering the igPDF18a.ocx component. Why is this occurring, and how can I register the component correctly?

Answer

To Register your igPDF18a.ocx component you will need to run the following command:

regsvr32 igPDF18a.ocx

If you receive an error stating that the component failed to load, then that likely means that regsvr32 is not finding the necessary dependencies for the PDF component.

The first thing you will want to check is that you have the Microsoft Visual C++ 10.0 CRT (x86) installed on the machine. You can download this from Microsoft’s site here:

https://www.microsoft.com/en-us/download/details.aspx?id=5555

The next thing you will want to check for is the DL100*.dll files. These files should be included in the deployment package generated by the deployment packaging wizard if you included the PDF component when generating the dependencies. These files must be in the same folder as the igPDF18a.ocx component in order to register it.

With those dependencies, you should be able to register the PDF component with regsvr32 without issue.

Question

I have a PDF of a form that I’m sending to PrizmDoc to have it auto-detect, but PrizmDoc does not find any fields in the document. What would cause this?

Answer

Currently only PDF files with embedded AcroForms will be auto-detected. If the PDF document
has an embedded image of a form, PrizmDoc will not find any results from auto-detection.

On July 12, 2022, Accusoft announced the latest update to PrizmDoc, its industry-leading document processing integration. The PrizmDoc 13.21 update improves existing features and adds key functionality related to format support, redaction capabilities, content conversion, and more, allowing developers to offer enhanced functionality within their applications. 

One of the main improvements in this release is to PrizmDoc’s Content Conversion Service (CCS). PrizmDoc now provides the ability to convert PDF documents to MS Word (DOCX) documents, making shared collaboration easier than ever before.

Other features and updates in this release include: 

  • High-Efficiency Image File Format (HEIF, HEIC) support for viewing, redaction, and conversion to JPG/JPEG, PDF, PNG, SVG and TIFF. 
  • PrizmDoc Viewer Markup Burner API now provides the ability to burn in redaction reason text for transparent (draft mode) redactions and provides the ability to remove PDF AcroForm fields. 
  • Improved performance of the PAS GET MarkupLayers API when using AWS S3 storage, which significantly reduces network traffic between PAS and S3.

PrizmDoc provides customizable document processing to help developers deliver in-browser document creation, editing, and collaboration functionality, to enhance their software applications.

For more information about PrizmDoc or to download a free trial, please visit our website.

About Accusoft: 

Founded in 1991, Accusoft is a software development company specializing in document processing, conversion, and automation solutions. From out-of-the-box and configurable applications to APIs built for developers, Accusoft software enables users to solve their most complex workflow challenges and gain insights from content in any format, on any device. Backed by 40 patents, the company’s flagship products, including OnTask, PrizmDoc™ Viewer, and ImageGear, are designed to improve productivity, provide actionable data, and deliver results that matter. The Accusoft team is dedicated to continuous innovation through customer-centric product development, new version release, and a passion for understanding industry trends that drive consumer demand. Visit us at www.accusoft.com.

Question

I have a PDF of a form that I’m sending to PrizmDoc to have it auto-detect, but PrizmDoc does not find any fields in the document. What would cause this?

Answer

Currently only PDF files with embedded AcroForms will be auto-detected. If the PDF document
has an embedded image of a form, PrizmDoc will not find any results from auto-detection.

Question

Today we noticed that when trying to start the Prizm service, it hangs for a few minutes and then displays an error: “Service Failed to start in a timely fashion”, and the service remains stopped.

The watchdog.console.log shows “DieError: Configuration error, failed to parse the configuration file”.

How can we fix this?

Answer

This issue typically happens when the server was not shut down properly, and some of the PrizmDoc files have become corrupted.

To resolve the issue, take the following steps:

  1. Make a backup of your PrizmDoc configuration files.
  2. Uninstall and then re-install PrizmDoc.
  3. Verify the service is running.
  4. Stop the service, restore backed-up configuration files.
  5. Restart Prizm service.