Technical FAQs

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 am combining multiple PDF documents together, and I need to create a new bookmark collection, placed at the beginning of the new document. Each bookmark should go to a specific page or section of the new document.
Example structure:

  • Section 1
    • Document 1
  • Section 2
    • Document 2

How might I do this using ImageGear .NET?

Answer

You are adding section dividers to the result document. So, for example, if you are to merge two documents, you might have, say, two sections, each with a single document, like so…

  • Section 1
    • Document 1
  • Section 2
    • Document 2

…The first page will be the first header page, and then the pages of Document 1, then another header page, then the pages of Document 2. So, the first header page is at index 0, the first page of Document 1 is at index 1, the second header is at 1 + firstDocumentPageCount, etc.

The following code demonstrates adding some blank pages to igResultDocument, inserting pages from other ImGearPDFDocuments, and modifying the bookmark tree such that it matches the outline above, with "Section X" pointing to the corresponding divider page and "Document X" pointing to the appropriate starting page number…

// Create new document, add pages
ImGearPDFDocument igResultDocument = new ImGearPDFDocument();
igResultDocument.CreateNewPage((int)ImGearPDFPageNumber.BEFORE_FIRST_PAGE, new ImGearPDFFixedRect(0, 0, 300, 300));
igResultDocument.InsertPages((int)ImGearPDFPageNumber.LAST_PAGE, igFirstDocument, 0, (int)ImGearPDFPageRange.ALL_PAGES, ImGearPDFInsertFlags.DEFAULT);
igResultDocument.CreateNewPage(igFirstDocument.Pages.Count, new ImGearPDFFixedRect(0, 0, 300, 300));
igResultDocument.InsertPages((int)ImGearPDFPageNumber.LAST_PAGE, igSecondDocument, 0, (int)ImGearPDFPageRange.ALL_PAGES, ImGearPDFInsertFlags.DEFAULT);

// Add first Section
ImGearPDFBookmark resultBookmarkTree = igResultDocument.GetBookmark();
resultBookmarkTree.AddNewChild("Section 1");
var child = resultBookmarkTree.GetLastChild();
int targetPageNumber = 0;
setNewDestination(igResultDocument, targetPageNumber, child);

// Add first Document
child.AddNewChild("Document 1");
child = child.GetLastChild();
targetPageNumber = 1;
setNewDestination(igResultDocument, targetPageNumber, child);

// Add second Section
resultBookmarkTree.AddNewChild("Section 2");
child = resultBookmarkTree.GetLastChild();
targetPageNumber = 1 + igFirstDocument.Pages.Count;
setNewDestination(igResultDocument, targetPageNumber, child);

// Add second Document
child.AddNewChild("Document 2");
child = child.GetLastChild();
targetPageNumber = 2 + igFirstDocument.Pages.Count;
setNewDestination(igResultDocument, targetPageNumber, child);

// Save
using (FileStream stream = File.OpenWrite(@"C:\path\here\test.pdf"))
{
    igResultDocument.Save(stream, ImGearSavingFormats.PDF, 0, 0, igResultDocument.Pages.Count, ImGearSavingModes.OVERWRITE);
}

...

private ImGearPDFDestination setNewDestination(ImGearPDFDocument igPdfDocument, int targetPageNumber, ImGearPDFBookmark targetNode)
{
    ImGearPDFAction action = targetNode.GetAction();
    if (action == null)
    {
        action = new ImGearPDFAction(
            igPdfDocument,
            new ImGearPDFDestination(
                igPdfDocument,
                igPdfDocument.Pages[targetPageNumber] as ImGearPDFPage,
                new ImGearPDFAtom("XYZ"),
                new ImGearPDFFixedRect(), 0, targetPageNumber));
        targetNode.SetAction(action);
    }
    return action.GetDestination();
}

(The setNewDestination method is a custom method that abstracts the details of adding the new destination.)

Essentially, the GetBookmark() method will allow you to get an instance representing the root of the bookmark tree, with its children being subtrees themselves. Thus, we can add a new child to an empty tree, then get the last child with GetLastChild(). Then, we can set the action for that node to be a new "GoTo" action that will navigate to the specified destination. Upon save to the file system, this should produce a PDF with the below bookmark structure…

Bookmarks example

Note that you may need to use the native Save method (NOT SaveDocument) described in the product documentation here in order to save a PDF file with the bookmark tree included. Also, you can read more about Actions in the PDF Specification.

Question

How do I ensure temp files are deleted when closing ImageGear .NET?

Answer

All PDF objects are based on underlying low-level PDF objects that are not controlled by .NET resource manager and garbage collector. Because of this, each PDF object that is created from scratch should be explicitly disposed of using that object’s Dispose() method.

Also, any ImGearPDEContent object obtained from ImGearPDFPage should be released using the ImGearPDFPage.ReleaseContent() in all cases.

This should cause all temp files to be cleared when the application is closed.

Question

How do I ensure temp files are deleted when closing ImageGear .NET?

Answer

All PDF objects are based on underlying low-level PDF objects that are not controlled by .NET resource manager and garbage collector. Because of this, each PDF object that is created from scratch should be explicitly disposed of using that object’s Dispose() method.

Also, any ImGearPDEContent object obtained from ImGearPDFPage should be released using the ImGearPDFPage.ReleaseContent() in all cases.

This should cause all temp files to be cleared when the application is closed.

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.

ocr optical character recognition

Effective document management is now a top priority for organizations, but for many, it remains a challenge. As noted by recent AIIM survey data, companies are struggling to handle both the documents they have and the rapid uptake of new information. In fact, 43 percent said their biggest priority is effectively leveraging the structured and unstructured content they already have, while 57 percent are focused on understanding the overwhelming big data.  Optical character recognition (OCR) is a critical component of document management.

For software development firms, this poses a particular challenge. Products are no longer feature complete without critical end-user functions such as advanced optical character recognition and powerful search. However, adding this functionality is not as easy as it sounds. Developers building out this comprehensive construct from the ground up requires both time, effort, and continued maintenance, which is a large undertaking for any company.

Accusoft’s ImageGear SDK offers a way to bridge the OCR gap with comprehensive image processing and manipulation capabilities that both streamline software development and deliver on end-user expectations.*


What is ImageGear?

ImageGear easily integrates into existing applications to deliver cutting-edge document management functionality at scale. Available for both .NET and C/C++ frameworks, ImageGear allows developers to quickly deploy and white-label key features including image processing, manipulation, conversion, and PDF and document search.

This add-on OCR functionality delivers highly-accurate optical character recognition to any .NET (C#) or C/C++ application. ImageGear’s OCR add-on provides full-page character recognition for more than 100 languages — including both Western and Asian languages such as Korean, Japanese, and Chinese character sets. It’s capable of recognizing multiple languages within a single image for enhanced document management. Other OCR features include:

  • Automatic page segmentation into individual zones for processing
  • Type assignment per zone based on defined flows, tables, or graphics
  • Table detection with advanced technology to enhance data reconstruction output
  • Entire page or individual region image processing
  • Zone definition by user, existing files, or detected automatically by the OCR engine

In addition, software developers can enhance ImageGear OCR functionality by leveraging both predefined and customizable dictionaries to ensure validated results using regular expressions. 


Why Optical Character Recognition (OCR) Matters to End-Users

Advanced OCR integration makes it easier for end-users to find what they’re looking for, when they’re looking for it. Instead of forcing users to find additional apps that deliver specific services, in-app OCR delivers increased satisfaction by streamlining user search functionality.

Common use cases include:

  • Legal eDiscoveryThe eDiscovery process is a critical — and often complex — stage of legal case preparation. Firms need to quickly find key terms, phrases, and images within legal documents to ensure they meet both client expectations and compliance obligations. With many forms now scanned and stored in non-standard file formats that contain form fields, text boxes, and digital imagery, OCR is essential to help lawyers streamline the process of eDiscovery at scale.

 

  • Financial Document ProcessingClients now expect loan applications and credit card applications to be processed at scale and speed. This is especially critical as firms embrace the idea of remote work — both staff at home and those in the office need end-to-end OCR functionality to deliver complete document management.

 

  • Insurance Documentation Assessment Insurance claims are both complex and comprehensive, requiring complete documentation from clients, contractors, and compliance agencies. As insurance firms move to tech-first frameworks to enhance document processing, speed, and accuracy, OCR makes it easy for staff to find specific data and ensure documentation is complete. 

Integrating OCR

Advanced OCR functionality won’t deliver expected outcomes if integration is cumbersome and complex. ImageGear streamlines this process with easy SDK implementation for both .NET and C/C++.

ImageGear .NET can be easily deployed on multiple platforms. These .NET deployments include ASP.NET functions such as image display, thumbnail display, annotation support, and cloud capture along with WPF printing and annotation support. ImageGear for C/C++, meanwhile, offers support for several platforms as well. Check out the developer resources section to see an updated list.


How Your Clients Use Optical Character Recognition (OCR)

PDFs remain the go-to file format for many industries, offering both standardized image and text conversion along with the ability to easily set or restrict document permissions. The problem? PDFs are notoriously difficult to search, making it hard for end-users to quickly find the text or data they need.

ImageGear makes it easy to OCR PDFs using the ImGearRecPage.Recognize Method, which leverages the zone list of the image to deliver accurate OCR — or, if this list is empty, automatically calls the page-layout decomposition process (auto-zoning) to complete the OCR process.

C# supports OCR to PDF.


using System.IO;
using ImageGear.Core;
using ImageGear.Formats;
using ImageGear.Evaluation;
using ImageGear.Recognition;

namespace ImageGearTest
{
    class Program
    {
        static void Main(string[] args)
        {
            // Initialize evaluation license.
            ImGearEvaluationManager.Initialize();
            ImGearEvaluationManager.Mode = ImGearEvaluationMode.Watermark;

            // Initialize the Recognition Engine.
            ImGearRecognition igRecognition = new ImGearRecognition();

            // ImageGear assemblies require explicit initialization at application startup.
            ImGearCommonFormats.Initialize();

            // Open a FileStream for our output document.
            using (FileStream outputStream = new FileStream(@"c:\temp\outputDoc.txt", FileMode.OpenOrCreate, FileAccess.ReadWrite))
            {
                // Open a FileStream for our source multi-page image.
                using (FileStream multiPageDocument = new FileStream(@"c:\temp\test.tif", FileMode.Open))
                {

                    // Load every page of the multi-page document. Starting at page 0 and loading the range of spaces specified.    
                    // Since the range is -1, that specifies that all pages shall be loaded.     
                    ImGearDocument doc = ImGearFileFormats.LoadDocument(multiPageDocument, 0, -1);

                    // Determine the amount of pages in the multi-page image.
                    int numPages = ImGearFileFormats.GetPageCount(multiPageDocument, ImGearFormats.UNKNOWN);

                    // Recognize each page of the multi-page document and add the results to outputStream.
                    for (int pageNumber = 0; pageNumber < numPages; pageNumber++)
                    {

                        // Cast the current page to a raster page and import that page.
                        using (ImGearRecPage igRecPage = igRecognition.ImportPage((ImGearRasterPage)doc.Pages[pageNumber]))
                        {

                            // Preprocess the page.
                            igRecPage.Image.Preprocess();

                            // Perform recognition.
                            igRecPage.Recognize();

                            // Add OCR results to the outputStream.
                            igRecognition.OutputManager.WriteDirectText(igRecPage, outputStream);

                        }
                    }
                }

            }
            // Dispose of objects we are no longer using.
            igRecognition.Dispose();
        }
    }
}

 


OCR Access and Analysis

Advanced OCR isn’t enough in isolation — developers must also empower end-users to quickly access and analyze OCR output. ImageGear offers multiple options to help streamline this process, such as:

  • Storage of Output as Code Pages
  • Export to Text Format
  • Export to PDF
  • Export to MRC PDF
  • Export to a Formatted Document

Find Your Best Fit

ImageGear OCR makes it easy for end-users to quickly search critical documents, find the data they need, and analyze optical character recognition output, but don’t take our word for it. Seeing is believing. Test ImageGear in your own environment and discover the difference of advanced OCR. 

*Optical character recognition is an ImageGear add-on and must be requested upon purchase of a license.

 

convert excel pdf

Companies have a love/hate relationship with PDFs. While Adobe’s portable file format has been around for decades and remains one of the most popular document types available, some of its best features are overshadowed by frustration around conversion. Faced with a barrage of read-only PDF files or looking for ways to ensure the integrity of critical document data, you can spend significant time and effort searching for the ideal PDF converter application.   This is particularly true when trying to convert Excel to PDF.

In some cases, this means ignoring IT best practices to leverage web-based “convert PDF free” tools that offer the benefit of speed, but could introduce potential security risk. In others, you might opt for large-scale document solutions that make the process of PDF conversion cumbersome and complex.

As noted by recent research from Deloitte, shifting market trends make both approaches problematic. Consider converting a familiar spreadsheet format — Excel — into PDF. What should be a simple task is often torturous and time-consuming and can significantly impact staff productivity. Let’s break down this situation further. In this blog, we’ll explore the operational impact of PDFs, consider the case for conversion, assess the spreadsheet-specific situation, and offer a step-by-step solution for potential PDF permutations.

 


The History of the PDF

  • A quick search turns up multiple articles for and against the use of PDFs for business documents. Detractors cite the sometimes cumbersome process of converting and modifying this format, while electronic evangelists focus on the consistency of content across PDF files. To understand the impact of PDFs, let’s take a quick historical detour. First developed in 1991 by Adobe co-founder Dr. John Warnock, the Camelot Project focused on document consistency across user, location, and device. By 1992, Camelot became PDF and introduced two key features that keep it front-and-center for businesses:
    • Preservation PDFs are designed to preserve all data in the original file in its original format. As a result, any content — from text to graphics to spreadsheets — remains consistent when converted to PDF.
    • StandardizationNot only do PDFs meet ISO 32000 standards for electronic document exchange, the format also includes specialty standards such as PDF/A for archiving, PDF/X for printing and PDF/E for engineering.

 


The Case for Conversion

While preservation and standardization speak to the benefits of PDF creation, why do so many companies prioritize conversion? First is the read-only nature of basic PDF files. Consider documents that contain customers’ personally identifiable information (PII) or employees’ HR data. Demands for intra-company interoperability mean these documents are often widely distributed across multiple departments and even outside the organization.

Storage is also a key consideration. While many files — including Excel spreadsheets — can quickly balloon in size as data volumes increase, compression comes standard with PDFs. This permits greater storage with a smaller footprint to help maximize the capacity of local storage infrastructure.

 


The Situation with Spreadsheets

Spreadsheets offer a specific situation for PDF conversion. With spreadsheets often the standard format for financial reporting and offering critical functionality for structured data analysis, Excel files are everywhere. The challenge? Ensuring the right people can access the right data at the right time — with the right context. Consider spreadsheets sent from a desktop to a mobile device that isn’t equipped with the same office software. What appears as tidy rows and columns on a computer monitor may be a contextually convoluted mess on mobile devices, forcing you to work against existing formats rather than finding common function. 

Excel to PDF conversion offers three benefits to help solve the spreadsheet situation:

  • Format Persistence  — From standard spreadsheets to charts and graphs, the original format of Excel files is maintained in PDF. As a result, recipients don’t need specific office software to read Excel documents — in-app or online PDF readers are the only requirement.
  • Content Curation With the right PDF conversion tools, staff can easily choose what to share and how to share it. From converting entire documents to specific pages, making comments, or adding redactions, sharing is secure and simple.
  • Password ProtectionSpeaking of security, PDFs also permit password protection for both access and editing. This both reduces the risk of unintended access and ensures that only authorized personnel can alter spreadsheet data.

The Market for Modification

Given the popularity of PDFs and the potential benefits of effective conversion, it’s no surprise that the market for modification is rapidly diversifying. From lightweight applications that allow users to convert PDFs for free to online PDF converters, there are now multiple options to make the move from spreadsheet files to portable document formats. The challenge? Finding your best fit. For example, while free online tools offer the benefit of quick conversion, they introduce potential security issues if spreadsheets are converted outside the confines of local networks. 

Robust and reliable options from well-known providers, meanwhile, offer ways to maximize security without losing speed. Solutions like Accusoft’s ImageGear integrates alongside your existing applications, allowing document conversion under the auspices of local networks, while the PrizmDoc Cloud Conversion API lets you leverage the power of cloud resources customized to meet your needs. Even better? Start converting PDFs for free right now with an ImageGear trial or 300 free transactions in the Accusoft Cloud.  

 


A Step-by-Step Guide: How to Convert an Excel File to PDF

Ready to start converting spreadsheets with us? It’s easy. If you’re using the PrizmDoc Cloud Conversion API, easy is the operative word. Simply select your source format, pick the pages you want to convert, and then define your destination format. Need pages 1-5 of your XLS document in a PDF? No problem. Looking to merge multiple pages into a single document? We’ve got you covered.

If SDKs are more your style, there’s a simple, step-by-step process to convert Excel files into PDFs:

Step 1: Create an instance of Microsoft Excel format after initializing ImageGear.NET

In C#:


ImGearFileFormats.Filters.Add(ImGearOffice.CreateExcelFormat());

 

Step 2: Modify the open dialog box to accept *.xlsx and *.xls extensions.

In C#


 // After installation make sure you are including the following using statements
 using ImageGear.Formats.PDF;
 using ImageGear.Formats;
 using ImageGear.Formats.Office;
 using ImageGear.Core;
 using System.IO;
 using ImageGear.Evaluation;
            
// If you are evaluating our product, initialize the evaluation license
 ImGearEvaluationManager.Initialize();
 
 // After some initializations, load the necessary ImGear filters to create an instance 
 // of Microsoft Word format for input and an instance of PDF format for output using 
 // code that looks like:    
 ImGearFileFormats.Filters.Add(ImGearOffice.CreateExcelFormat());
 ImGearFileFormats.Filters.Add(ImGearPDF.CreatePDFFormat());
 
 // Next, the PDF library requires its own initialization:
 ImGearPDF.Initialize();
 
 // Then, simply read in all pages of the Word document using the 
 // ImGearFileFormats.LoadDocument() method:
 ImGearDocument igDocument;
 using (FileStream fileStream = new FileStream(inputFileName, FileMode.Open, FileAccess.Read, FileShare.Read))
 {
     igDocument = ImGearFileFormats.LoadDocument(fileStream);
 }
 
 // Finally, write out the document as PDF using the ImGearFileFormats.SaveDocument() 
 // method with the saving format set to ImGearSavingFormats.PDF and no special options:
 using (FileStream fileStream = new FileStream(outputFileName, FileMode.Create, FileAccess.ReadWrite))
 {
      ImGearFileFormats.SaveDocument(igDocument, fileStream, 0, ImGearSavingModes.OVERWRITE, ImGearSavingFormats.PDF, null);
 }

Ready to accelerate output and improve productivity? Keep conversion close to home with ImageGear, or opt for secure operational outsourcing with the PrizmDoc Cloud Conversion API.

Document image cleanup is a vital step in building an efficient and accurate processing workflow. In a perfect world, every file an organization receives would be in pristine, high-resolution condition so it could be processed quickly and easily. Unfortunately, the reality is that documents come in all sizes, conditions, and formats. Companies can receive vital information in the form of email, traditional mail, fax, or even text. Documents scanned into a crooked, low-resolution file are just as likely to be received alongside digital versions submitted entirely through a web application.

This poses a significant challenge for software developers building the next generation of automation solutions. Without some way of cleaning up document images, companies that still rely upon manual processes will struggle to read and process files. More importantly, poor image quality interferes with optical character recognition (OCR) engine accuracy, making more human interaction necessary to verify recognition results. By integrating document image cleanup tools into their applications, developers can enhance the speed and accuracy of their automated processes and help their customers leverage the full potential of digital transformation.

7 Essential Document Image Cleanup Features Your Application Needs

There are a few essential document image cleanup tools that should be considered absolutely essential for any application that has to manage multiple file formats. To see these tools in action and understand why they’re so vital, let’s take a look at how these features work in ImageGear, Accusoft’s powerful document and image processing SDK integration.

1. Despeckling

Speckles can appear on document images for a variety of reasons. In some cases, they are unwanted image noise created during the original scanning process (the classic “salt and pepper” noise), but in other instances, they’re simply the result of dust particles on the surface of a scanned document or on the scanner itself. They are frequently encountered when converting old documents into digital form. Speckling not only interferes with OCR engine performance, but can also make it difficult to maintain image fidelity when compressing or converting files. 

ImageGear can reduce or eliminate speckling as part of the document image cleanup process. There are two ways to approach speckle removal:

  • Despeckle Method: This function removes color noise from 1-bit images by taking the average color value in a square area around the speckle and replacing its pixels with that value.
  • GeomDespeckle Method: This function uses the Crimmins algorithm to send the image through a geometric filter, reducing the undesired noise while preserving edges of the original image. This process is applied only to 8-bit grayscale images.

2. Image Inversion

With so many documents being scanned, converted, and transferred between applications, there’s a greater likelihood of something going wrong along the way. One of the most frequent problems is image inversion, which swaps pixel colors and turns a standard white background with black text into a black background with white text. This mix-up can render documents completely unreadable by OCR engines.

ImageGear can be configured to automatically recognize when image inversion is necessary. The invert method can also be used to immediately change the color of each pixel contained in the entire image, turning white to black and black to white.

3. Deskewing

Skewed document images are both cumbersome to manage and challenging for OCR engines to read accurately. Unfortunately, manually scanned documents are often uneven, and the problem is only becoming worse now that many people are using their phone cameras as makeshift document scanners. That’s why the first step in the document image cleanup process is often deskewing, which rotates and aligns the images to enhance recognition accuracy.

The deskewing process often involves more than just rotating a document, especially where images taken by a digital camera are concerned. ImageGear’s 3D deskew feature corrects for perception distortion, which can occur whenever a document is scanned by a handheld camera, using a sophisticated algorithm.

4. Blank Page Detection

Many documents converted into digital format contain information on both sides. If they are fed into a scanner along with single page documents, the resulting file will contain multiple blank pages. This might not seem like much of a problem, but if there is enough speckling or noise around the edge of the image, an application may try to apply an OCR engine to it and generate an error result. Blank page detection can quickly identify any image that is blank or mostly white and flag it for deletion.

5. Line Removal

Although they may not seem very troublesome at first glance, lines can create a number of problems for OCR engines. When lines and printed text overlap, it can be difficult for the engine to distinguish between the two. In some instances, the engine may even misread a line as a letter or number. Removing lines from a document prior to OCR reading ensures that the remaining text will be recognized more quickly and analyzed more accurately.

ImageGear supports both solid line removal and dotted line removal. The first method automatically detects and removes any horizontal and vertical lines contained in the document (like frames or tables), while the second method determines which dotted lines to remove by measuring the number and diameter of dots.

6. Border Removal

When scanned documents don’t align properly with the boundaries of the scanner or were copied onto paper that was larger than the original image at some point, the remaining space is often filled in with black. These borders are not only unsightly, but they also interfere with other document image cleanup processes. Although they can usually be cropped out easily, the cropping process alters the proportions of the image, which could create more problems later.

Removing these large black regions is easy with ImageGear’s CleanBorders option. It focuses on the areas near the edge of the page, which typically should not contain any important image data. 

7. Remove Hole Punches

Important documents were often stored in binders before they were prepared for digitization. When scanned, the blank space from the hole punch leaves a large, black dot along the edge of the document. Unfortunately, these holes sometimes overlap with text or could be picked up as filled-in bubbles by an optical mark recognition (OMR) engine.

ImageGear can identify and remove punch holes created by common hole punchers, including two, three, and five hole configurations. The RemovePunchHoles method can be adjusted to account for differing hold diameters in addition to different locations.

Unlock Your Application’s Document Image Cleanup Potential with ImageGear

Although ImageGear can perform a variety of document handling functions such as viewing, conversion, annotation, compression, and OCR processing, its document image cleanup capabilities help applications overcome key content management challenges and enhance performance in other areas. Improved document image quality allows data to be extracted more quickly, enhances the viewing experience, and reduces complications when it comes to file compression and conversion.

Learn more about the ImageGear collection of SDKs to discover how they can deliver versatile document and image processing to your applications.

Having the right technology in place is essential for healthcare organizations seeking to deliver better patient outcomes. That’s why medical technology developers are working hard to build the next generation of software tools that will help medical professionals to deliver care more effectively. 

Annotation features provide a number of benefits in these ongoing efforts. Although typically associated with editing and workplace collaboration, medical annotations also have a very different and very specific role when it comes to diagnostic imaging and patient health records.

Enhancing Healthcare Collaboration with Annotations

One of the most straightforward use cases for medical annotation is communicating important information regarding diagnostic images. As images like MRIs and X-rays are passed back and forth between providers, radiologists, technicians, and clinicians, the ability to add comments and point out important details greatly reduces the chance of confusion or of some critical detail being overlooked.

The challenge in these cases, however, is to annotate images and documents without altering the integrity of the original files. This requires healthcare technology developers to build solutions that can retain an unaltered version of the file even as multiple collaborators view and make comments. 

Medical Annotation and Machine Learning

Healthcare solutions are rapidly incorporating sophisticated machine learning tools to analyze large quantities of data and make a quick, accurate diagnosis of conditions. Before these powerful tools can perform that diagnostic work, they need to be properly trained to know what they’re looking for, especially when it comes to very nuanced differences between scanned images and seemingly unrelated details in patient records.

By using annotation tools, medical technology specialists can provide excellent guidance for machine learning development. An MRI scan, for instance, contains so much information that an AI-driven program isn’t going to know what to look for unless the key elements are called out with annotations that indicate certain parts of the image or provide comments about noteworthy aspects.

The DICOM Dilemma

While many software integrations allow developers to incorporate annotation tools for common file formats like PDF and JPEG, the healthcare sector presents a unique challenge in the form of DICOM files. This industry-specific format contains both images and important metadata identifiers that provide information about the image itself and the patient in question. While there are ways to extract images from DICOM files and convert them into a more manageable format, doing so could endanger compliance status or permanently degrade the image quality.

Developers working on healthcare technology solutions need to make sure they can not only deliver annotation tools, but also the ability to add annotations to DICOM files without altering the source file itself. 

Mastering Medical Annotation with ImageGear Medical

ImageGear Medical provides a broad range of XML-based annotation features that allows healthcare software developers to implement UI elements for marking up both images and documents. Since this powerful imaging SDK also gives users the ability to create and view DICOM files, it can quickly enhance the functionality of medical applications to enhance collaboration and ensure diagnostic accuracy.

Once integrated into an application with a viewing UI, ImageGear Medical supports several commonly-utilized annotation marks that makes it easy for users to highlight certain aspects of an image, comment on them, and even cover up some elements using filled-in graphical objects. Annotations can also be grouped in layers to make them easier to manage and distinguish from one another.

ImageGear Medical annotation objects for DICOM include:

  • Text: Adds descriptive text using a variety of fonts, colors, and sizes. Opacity can be adjusted and the text object can appear with or without a border.
  • Point: Places a coordinate point on the image or document, which can be used to support other annotation marks.
  • Polyline: A series of connected straight lines formed by dragging and clicking a mouse or pointer.
  • Curve: Used for creating spline curve marks. Users can select multiple vertices and tensions when creating curves.
  • Ellipse: A circular outline mark that can be used to indicate important elements of an image or document. When filled, it can also cover up areas of the image.
  • Polygon: Like the ellipse, it can be filled or unfilled and is typically deployed to cover or highlight some aspect of an image or document. Polygons are especially useful for medical annotation because they can capture more lines and angles than simple rectangles or circles.

In order to maintain the integrity of the original image, ImageGear Medical stores annotations as a separate file that is overlaid upon the image during display. While annotations can be merged, or “burned in” the file, keeping them separate ensures that the original image itself is not altered directly. This is incredibly important when it comes to DICOM files, which often need to be kept on file for baseline comparisons on a future diagnosis.

Enhance Healthcare Flexibility with ImageGear Medical

Annotations and DICOM viewing support are just the beginning of ImageGear Medical’s expansive feature set. It also provides advanced filtering tools for sharpening and smoothing as well as image cleanup functions like despeckling, noise removal, and deskewing. With support for several dozen medical image and document formats, ImageGear Medical can easily convert files into easy-to-manage formats and compress files for efficient storage.

Available for .NET and C/C++ environments, ImageGear Medical can turn your healthcare application into a powerful annotation platform with full support for DICOM files. Start your free trial of this powerful SDK to discover first-hand how it can empower your medical annotation solution.

TAMPA, Fla. – On September 22, 2020, Accusoft announced its latest SDK, ImageGear PDF. This integration enables developers to add a variety of PDF functionalities into an application.

“We are proud to add ImageGear PDF as the latest addition to our product portfolio,” says Jack Berlin, CEO of Accusoft. “We recognized a need in the market for a more robust PDF solution that developers could use to enhance their products. Using our proprietary technology, I knew we could bridge that gap.”

ImageGear PDF gives end-users the ability to merge multiple PDFs, split a PDF into multiple PDFs, rearrange pages within a PDF, add pages or remove pages in a PDF, and more. The SDK adds programmatic annotation capabilities as well as compression, signature, comparison, and data capture.

“ImageGear PDF is a great tool for developers looking to enhance their application,” says Mark Hansen, Sr. Product Manager of SDKs. “Accusoft has a variety of different PDF solutions, but we wanted to add a more robust SDK that solves PDF pain points more efficiently.”

ImageGear PDF is available with an optical character recognition (OCR) add-on feature, which programmers can use to search for specific characters within a document, highlight different sections, and markup the output for easier viewing and collaboration. To learn more about ImageGear PDF, please visit our website at accusoft.com/products/imagegear-collection/imagegear-pdf/.

About Accusoft:

Founded in 1991, Accusoft is a software development company specializing in content 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.

Image compression has become such a ubiquitous aspect of the digital world that the average person doesn’t give it much thought. Even when they encounter textbook compression problems, such as running out of space for photos on their phones, waiting on a slow-loading webpage, or working with an overly pixelated image, they may not consider how effective compression techniques could resolve these issues.

Today’s software developers, by contrast, spend a lot of time thinking about how to incorporate better compression solutions into their applications. That’s why they frequently turn to image compression SDKs to help their end users better manage large and highly-detailed image files.

The Enduring Need for Image Compression

Although advancements in hard drive technology and easily scalable cloud storage have reduced many traditional data management concerns, large image files can still pose significant challenges. Many organizations that can’t utilize cloud storage options for compliance reasons or find the cost of those platforms prohibitively high. 

While they may be able to add more on-premises storage easily enough, this option can also quickly become quite costly. Companies often need to procure much more storage than they may need on a day-to-day basis in order to meet redundancy requirements. Scaling physical storage also locks firms into burdensome equipment refresh cycles.

But simply storing images is only part of the challenge of data management. Large files are more difficult to move, even if an organization has a customized solution in place. If images can’t be shared quickly and easily through a secure platform, users may turn to riskier third-party applications.

Image compression alleviates these problems by reducing the overall size of image files. By compressing image files, organizations can maximize their storage potential and share files more easily. Image compression can also improve website and application performance by reducing the time it takes to load images. 

Although there are many different methods of compressing images, they all involve algorithms that use a variety of shortcuts to reduce the overall size of pixel data. In some instances, compression involves the elimination of image data, which can degrade the image quality and make it impossible to return to its original size (lossy or irreversible compression). Other techniques retain the original image data, but can’t achieve the same level of compression (lossless or reversible compression). 

Image Compression SDKs and Your Applications

While there are many compression options available in commercial imaging software, organizations often need the ability to compress image files within their core business applications without any external dependencies. Opening an image file with another program not only takes additional time and disrupts efficient workflow, but it also creates the potential for security risks and version confusion.

Consider, for instance, a medical provider that needs to send a high-resolution MRI scan to another provider. If the file is too large to deliver electronically, someone may try to get around the problem by using another program to compress the scan and then send it as an attachment over email or share it through a cloud platform. Suddenly, the confidential image file has been accessed by potentially vulnerable third-party applications, which creates a serious compliance issue. To make matters worse, the compressed image may not be associated with the patient’s file in the EHR system. And that’s not even getting in the question of whether or not the compression technique used damaged the image integrity!

An image compression SDK like ImageGear allows developers to integrate the ability to compress and convert image files into their applications without compromising security, efficiency, or quality. Optimized, standards-based compression libraries with support of formats like TIFF, PDF, PDF/A, JPEG 2000, JPEG, and DICOM deliver fast compression/decompression capabilities while ensuring that images remain high quality. 

The primary advantage of integrating image compression capabilities directly into an application is the lack of third-party dependencies. This is crucial for software that is gathering and managing image files because it doesn’t cause any workflow disruptions. With an image compression SDK integration, image files can be shrunk down to more manageable sizes programmatically, which aids significantly in automated processes. Since the images are being compressed entirely within the application, it’s also easier to maintain strict version and access control throughout the life cycle of the file.

Image Compression SDKs vs Open Source Solutions

Many developers turn to open source compression libraries when looking to integrate image compression features into their applications. While this often seems like an easy, low cost solution, open source codecs can lead to unforeseen problems over time. Since many of them are not actively maintained, troublesome bugs can go unresolved and security gaps can create serious privacy risks.

One infamous example of this problem involved the widely used “Cornell Codec,” one of the first open source libraries that supported lossless JPEG compression. Developed in 1994, it was quickly adopted by many healthcare applications that needed to compress high-resolution medical images like MIRIs, CT scans, and X-Rays. 

Unfortunately, the codec had a problem. When it compressed images into DICOM files (the industry standard used in medical imaging applications), it produced an error that made them unreadable when they were decompressed. Since the Cornell Codec was an open source solution embedded into numerous applications, the problem went unresolved for many years until Accusoft developed a code based workaround for our customers.

By choosing a well-supported image compression SDK like ImageGear for their application’s compression needs, developers can rest easier knowing that they’re deploying a tried and true solution that won’t create unexpected problems for their customers. Another benefit of a comprehensive image compression SDK is that it will provide a variety of compression libraries that can accommodate almost any file type and use case. ImageGear, for example, supports more than a dozen unique image compression types, including JPEG (lossy/lossless/progressive), RAW, ASCII, and Deflate.

ImageGear: More Than an Image Compression SDK

Image compression is just one of ImageGear’s many powerful document and image processing features. A versatile code-based solution, ImageGear allows developers to quickly integrate image conversion and cleanup features to their application along with editing, annotation, viewing, scanning, and printing capabilities. With support for a huge number of today’s leading document and image file formats as well as medical imaging support with ImageGear Medical, this SDK toolkit delivers the functionality developers need to get their applications to market faster. See what ImageGear can do for your application today by downloading a free trial.