Technical FAQs

Question

I am trying to perform OCR on a PDF created from a scanned document. I need to rasterize the PDF page before importing the page into the recognition engine. When rasterizing the PDF page I want to set the bit depth of the generated page to be equal to the bit depth of the embedded image so I may use better compression methods for 1-bit and 8-bit images.

ImGearPDFPage.DIB.BitDepth will always return 24 for the bit depth of a PDF. Is there a way to detect the bit depth based on the PDF’s embedded content?

Answer

To do this:

  1. Use the ImGearPDFPage.GetContent() function to get the elements stored in the PDF page.
  2. Then loop through these elements and check if they are of the type ImGearPDEImage.
  3. Convert the image to an ImGearPage and find it’s bit depth.
  4. Use the highest bit depth detected from the images as the bit depth when rasterizing the page.

The code below demonstrates how to do detect the bit depth of a PDF page for all pages in a PDF document, perform OCR, and save the output while using compression.

private static void Recognize(ImGearRecognition engine, string sourceFile, ImGearPDFDocument doc)
    {
        using (ImGearPDFDocument outDoc = new ImGearPDFDocument())
        {
            // Import pages
            foreach (ImGearPDFPage pdfPage in doc.Pages)
            {
                int highestBitDepth = 0;
                ImGearPDEContent pdeContent = pdfPage.GetContent();
                int contentLength = pdeContent.ElementCount;
                for (int i = 0; i < contentLength; i++)
                {
                    ImGearPDEElement el = pdeContent.GetElement(i);
                    if (el is ImGearPDEImage)
                    {
                        //create an imGearPage from the embedded image and find its bit depth
                        int bitDepth = (el as ImGearPDEImage).ToImGearPage().DIB.BitDepth; 
                        if (bitDepth > highestBitDepth)
                        {
                            highestBitDepth = bitDepth;
                        }
                    }
                }
                if(highestBitDepth == 0)
                {
                    //if no images found in document or the images are embedded deeper in containers we set to a default bitDepth of 24 to be safe
                    highestBitDepth = 24;
                }
                ImGearRasterPage rasterPage = pdfPage.Rasterize(highestBitDepth, 200, 200);
                using (ImGearRecPage recogPage = engine.ImportPage(rasterPage))
                {
                    recogPage.Image.Preprocess();
                    recogPage.Recognize();
                    ImGearRecPDFOutputOptions options = new ImGearRecPDFOutputOptions() { VisibleImage = true, VisibleText = false, OptimizeForPdfa = true, ImageCompression = ImGearCompressions.AUTO, UseUnicodeText = false };
                    recogPage.CreatePDFPage(outDoc, options);
                }
            }
            outDoc.SaveCompressed(sourceFile + ".result.pdf");
        }
    }

For the compression type, I would recommend setting it to AUTO. AUTO will set the compression type depending on the image’s bit depth. The compression types that AUTO uses for each bit depth are: 

  • 1 Bit Per Pixel – ImGearCompressions.CCITT_G4
  • 8 Bits Per Pixel – ImGearCompressions.DEFLATE
  • 24 Bits Per Pixel – ImGearCompressions.JPEG

Disclaimer: This may not work for all PDF documents due to some PDF’s structure. If you’re unfamiliar with how PDF content is structured, we have an explanation in our documentation. The above implementation of this only checks one layer into the PDF, so if there were containers that had images embedded in them, then it will not detect them.

However, this should work for documents created by scanners, as the scanned image should be embedded in the first PDF layer. If you have more complex documents, you could write a recursive function that goes through the layers of the PDF to find the images.

The above code will set the bit depth to 24 if it wasn’t able to detect any images in the first layer, just to be on the safe side.

If your legal clients produce substantial amounts of paperwork, the ability to add metadata during document processing can be invaluable. Without easily identifiable paperwork, law firms could waste hours trying to find one document out of one thousand. So how can metadata help?

Describe the Content

Clients can enter relevant information to quickly sort through documents to find the right file. Name, date, case number, and keywords can all be added in headers and footers to organize documents.

Organize Documents

Adding page numbers creates a structural framework that makes it easy to search for and find relevant documents. Metadata is also useful when preserving and archiving files within a searchable database.

Providing your clients with an easy way to add metadata to their documents helps streamline their document management processes. With the increasing demand for digital information sharing, metadata is an effective way to organize resources from various contributors. For example, if your client is a lawyer, they are likely receiving information from various sources for the same case. To stay organized, all of these documents can be tagged with metadata as they come in according to file types, case number, and description. Later, if the lawyer needs to find a specific document, they can perform a search for these metadata tags and recall all documents that fit the search parameters. Metadata saves time when searching for documents, allowing your users to spend more time with their clients and maximize their billable hours.

What if you don’t currently support metadata?

There are a number of third-party software providers offering metadata support, both for adding in new metadata and reading existing data on documents. If you plan on using a third party to incorporate metadata into your software, make sure to do your research. Factors such as security, versatility, and support should all be taken into consideration when shopping for software.
The key to making third-party code work for you and your business is setting and maintaining high standards. Make sure the code you choose to integrate into your applications is something you would be happy to see coming out of your own department.

Are you developing a legal application?

Check out PrizmDoc

[button color=”orange” size=”lg” url=”https://www.accusoft.com/products/prizmdoc/get-it”] Download your free trial today.[/button]

Independent Software Vendors (ISVs) often face the challenge of prioritizing their development efforts to maximize value and return on investment. Integrating new tools and technologies, such as advanced document processing and AI capabilities, can significantly enhance their products. However, making informed decisions about resource allocation is crucial. This is where the Cost of Delay (CoD) framework proves invaluable.

Understanding the Cost of Delay in Product Development

The Cost of Delay framework is a powerful tool that helps product teams prioritize work based on the consequences of delaying projects. By quantifying the various costs associated with postponing initiatives, organizations can assess the importance of each project and make informed decisions about resource allocation.

Key Costs Associated with Delaying Projects

Lost Revenue: Delays can lead to missed opportunities to generate revenue from enhanced product features.

  1. Increased Development Costs: Procrastination may result in higher costs due to increased complexity or the need to address technical debt.
  2. Competitive Disadvantage: If competitors successfully integrate these features first, it could erode market share and customer loyalty.
  3. Customer Dissatisfaction: Delays might frustrate customers who cannot access desired functionalities, potentially leading to churn.

For our customers, integrating advanced technologies like AI-driven document processing capabilities is critical. Delaying such integrations can result in lost revenue, increased development costs, competitive disadvantages, and customer dissatisfaction. This is where the Cost of Delay framework becomes invaluable.

Getting Started with PrizmDoc: A Tip for ISVs

For Independent Software Vendors (ISVs) aiming to integrate document viewing and processing with AI features into their Enterprise Content Management (ECM) applications using solutions like PrizmDoc, it’s crucial to start by identifying critical use cases that directly address customer needs. This focused approach helps in understanding the potential impact of integration and accurately quantifying the costs of delay associated with these initiatives.

The Cost of Delay (CoD) framework offers a structured method for ISVs to evaluate the benefits of integrating advanced document processing capabilities like those provided by PrizmDoc. By quantifying the costs associated with delays, ISVs can make informed decisions that maximize value and return on investment. Prioritizing development efforts based on the potential consequences of delay ensures that ISVs’ products remain competitive and effectively meet the evolving needs of their customers.

The year was 1996. Dot-com was booming, Y2K loomed on the horizon, and Australia-based Outback Imaging needed adaptable software development toolkits (SDKs) to prototype a desktop imaging application capable of pushing scanned documents into popular EDRM systems without the need for manual import tools. They also needed a custom-built TWAIN UI to unify the customer experience without locking them into specific scanner brands.

In what one can only imagine was a montage of classic search engine queries, the company sourced three likely candidates. Within six months, they found their front runner was Accusoft, and the partnership began.

In 2003, they rolled out their first commercial product, EzeScan. Today, the product does more than just document imaging — EzeScan now offers server-based automated task processing and browser-based document workflow and approval capable through Robotic Task Automation (RTA) 24/7/365 with no human intervention.

With B2B churn rates rising, Medium notes that “regardless of industry, customer retention is often many leaders’ main strategic objective given today’s highly competitive landscape.” What’s the secret to Accusoft and EzeScan’s ongoing, mutually beneficial relationship?

Thankfully, the answer isn’t a vague, inspirational quote. In fact, it’s possible to debrief this age-defying agreement with three key characteristics including scalability, simplicity, and support.

Document Imaging at Scale

For EzeScan to evolve from a digital imaging application to a document transformation powerhouse, Outback needed toolkits that operate seamlessly within a Microsoft IDE, enables easy deployment on Windows, and includes superior code examples and documentation.

After four months of building three prototypes, Outback selected Accusoft SDKs to help jumpstart EzeScan R&D and embrace the need for digital transformation at scale. Today, the company leverages Accusoft’s TWAIN, ISIS, and PDF tools along with their OCR, MICR, and ICR search engines to drive continual evolution in their application.

Avoiding Technical Debt

Outback now supplies software solutions to a global network of customers, enabling them to both “go digital” and leverage their digital information in a more meaningful way. But developing this worldwide reputation for quality components and actionable results required an SDK foundation that was easy to implement and simple to use.

Accusoft offered the ideal solution to their problem. Toolkits that are customizable, incredibly simple to integrate, and work as expected. For Outback, this meant the ability to easily test and maintain new code without worrying about technical debt building up behind the design team as they innovate.

You Need It? You Got It

As noted by the Harvard Business Review, responsiveness plays a critical role in the strength and stability of B2B relationships. Without ongoing, committed support for software and toolkits organizations often have no choice but to shift suppliers or run the risk of losing what they’ve built.

Support is an integral component of the Accusoft and Outback’s relationship. While problems rarely occur, when they do, these issues are prioritized and quickly remediated. The result? Both businesses come out ahead. B2B relationships rely on scalability, simplicity and support to stay afloat. Now in its 23rd year, the Outback and Accusoft partnership has never been stronger.

Question

When I view a document on PrizmDoc Cloud and it hits a cached document, is a transaction still consumed?

What defines a transaction on PrizmDoc Cloud?

Answer

A transaction is defined as: a document viewed, a document converted, a document OCR function performed, a form detected, or an image compressed.

PrizmDoc Cloud considers it a transaction anytime any of these actions are performed, regardless of how they are carried out.

convert pdf

PDFs are everywhere. Vice calls them “the world’s most important file format,” and that’s not far off the mark. The sheer number of documents converted to, from, and often back to PDFs is astounding. The hard truth? They’re also frustrating to work with. Start a Google search with the word “convert” and three of the top five results involve PDFs. 

While this portable document format lives up to its namesake by making it easy for users to attach and send documents across their organizations, PDFs often run into problems when it comes to conversion, collaboration, and communication. While many tools offer piecemeal PDF functionality, they lack a complete cadre of critical capabilities, in turn forcing software engineers to use multiple software solutions for seemingly simple tasks. 

ImageGear offers a different take on the standard software development kit (SDK) designed to help developers maximize their PDF potential. Here’s how it works. 


The Value of PDF Conversion

While PDF conversion is one of the top sought-after functionalities, there’s another area that’s often overlooked: modifying the characteristics of PDFs on-screen. With companies now handling PDFs from multiple sources that may include everything from computer-generated form data to handwritten information and images, it’s no surprise that staff encounter a wide variety of viewing issues.

ImageGear PDF helps solve these problems by allowing users to call the shots on PDF content at scale with features such as:

  • Conversion
  • Metadata Management
  • Content and Font Editing
  • Text Extraction
  • PDF Watermarking
  • Container, Dictionary, and Layer Creation
  • 3D Asset Modification

ImageGear PDF also helps improve document processing with document cleanup and advanced optical character recognition (OCR). With the ability to encrypt and decrypt entire images (or part of an image), automatic ImageClean correction of white text blocks, borders, and inverted images, plus intelligent re-sizing, any PDF can be cleaned and made more readable for the user. 

OCR support for almost any document type is also a benefit. This includes those produced on typewriters, dot-matrix printers, ink-jet printers, laser printers, and photocopied, scanned, and faxed documents. ImageGear PDF helps users control and customize multiple PDF variables, making it a fully functional PDF conversion solution for your application.


PDF Pain Points

One of the biggest PDF frustrations? The inability to break apart and combine PDF documents. Let’s imagine you have a massive legal PDF or in-depth medical file. In these circumstances, professionals only need a portion of the PDF, but without the right tools they’re stuck sending entire files when all they need is a single page. In other cases, employees might have a host of related PDFs that are part of the same project, but can’t be easily combined to save space and time.

ImageGear PDF has you covered with the ability to easily delete or insert PDF pages, render pages in a single PDF, split a PDF, merge two or more PDFs into a single file, or even merge specific pages from two or more PDFs into a single PDF. This not only makes a massive difference in time spent working with PDF documents, it helps reduce unnecessary storage and transmission of multiple files. 


Convert PDF: Multiple File Formats for Conversion

Conversion is critical for PDF success. Instead of creating complexity by forcing end-users to stick with original file formats, implementing an SDK with cutting-edge conversion empowers corporate consistency and saves on storage space. ImageGear PDF supports a host of common file formats for conversion including Microsoft Office, JPEG 2000, CAD, and SVG.

Of course, no feature forward PDF framework is complete without robust annotation, redaction, and commenting capabilities. These features make it easy for other users to see exactly what’s been changed, when, and why, along with providing a critical, auditable paper trail to meet evolving compliance and regulatory standards.


PDF Functionality for Your Application

Best of all, ImageGear isn’t designed to replace your current software, but integrate alongside existing workflows. Rather than adding another application to already-overloaded IT arsenals, straightforward SDK integration means everything happens within your own application, making it easy for everyone to find exactly what they’re looking for within familiar territory. Need help jumpstarting your SDK deployment? Check out our full list of ImageGear .NET samples for ASP.NET, CAD, OCR support, and more.

PDFs remain eternally popular and continually frustrating. Solve for document viewing, split and merge, and conversion issues and streamline employee efforts with ImageGear.

Question

I have installed PrizmDoc based on the documentation against a clean CentOS 7/RedHat 7 system, and Prizm services starts and is showing healthy. However, one of two issues are occurring:

  1. I cannot view HTML or picture files but can view PDF files.
  2. I cannot view PDF, Excel, or Word documents but can view HTML and Picture files.
Answer

If you cannot view HTML or picture files but can view PDF files, it is often due to specific required libraries not being installed. The following procedure can be executed on CentOS/RedHat 7 to ensure all required PrizmDoc libraries are installed.

  1. Stop the Prizm service: sudo /usr/share/prizm/scripts/pccis.sh stop

  2. Copy and paste all of the library installers into a terminal and wait for them to finish:

    yum install -y libbz2* libc* libcairo* libcups* libdbus-glib-1* libdl* libexpat* libfontconfig* libfreetype* libgcc_s* libgif* libGL* libjpeg* libm* libnsl* libopenjpeg* libpixman-1* libpng12* libpthread* librt* libstdc++* libthread_db* libungif* libuuid* libX11* libXau* libxcb* libXdmcp* libXext* libXi* libXinerama* libxml2* libXrender* libXtst* libz* linux-vdso*
    
  3. Restart the server.

If you cannot view PDF, Excel, or Word documents but can view HTML and Picture files, this is often due to installing the Generic PrizmDoc installer, which ends in either client_x86_64.tar.gz or server_x86_64.tar.gz. To resolve this issue you will need to re-install using the links that end in client_x86_64.rpm.tar.gz and server_RHEL7.tar.gz.

Cells can view and edit XLSX files. Other Microsoft Excel formats require conversion to XLSX.

 

Curious as to how to use PrizmDoc with Node.JS and HTML? You’ve found the right video! Watch as a Technical Support Rep takes you through the PrizmDoc Node.JS and HTML GitHub sample.

For additional information, please visit PrizmDoc!  To learn more about Accusoft, please visit www.Accusoft.com.

PrizmDoc uses advanced AI to conquer the challenges of managing massive documents in your Enterprise Content Management (ECM) system. Our AI eliminates manual work in tagging, sorting, and reviewing documents, saving you time and money while ensuring accuracy. Let PrizmDoc streamline your ECM experience!

 

Curious about how to use PrizmDoc with Node.JS and React? You’ve found the right video! Watch as a Technical Support Rep takes you through the PrizmDoc Node.JS and React GitHub sample.

For additional information, please visit PrizmDoc!  To learn more about Accusoft, please visit www.Accusoft.com.