Dynamsoft Blog

The leading provider of version control solutions and TWAIN SDKs

Dynamic .NET TWAIN 5.3 Released!

We’re more than excited to announce that Dynamic .NET TWAIN 5.3 is released. There are some new improvements we’d like to share with you.

  • A new property called ScanInNewProcess
    you can set this property to true to enable the feature of acquiring images in an independent process. With this feature, you can now access 32-bit TWAIN scanners from 64-bit applications.
  • Other minor fixes and tweaks

To learn full features or try out the latest version, please visit at

If you have a valid software maintenance contract, or are using version 5, please contact sales@dynamsoft.com for FREE upgrade to this new version.

If you are ready to purchase a license, please visit our Online Store or send your order to sales@dynamsoft.com.

For any tech questions, please email support@dynamsoft.com.

Making Web & .Net Document Scanning Apps in 2 Minutes

Dynamic Web TWAIN

Dynamic .NET TWAIN

5 Tips for Barcode Development in Healthcare

The BarCode News

Dynamsoft contributed an article to THE BarCode News that ran July 13, 2014. Start reading it below.

The use of barcodes in healthcare markets has been advocated going back to the 1970s. The Healthcare Information and Management Systems Society (HIMSS) has emphasized a high priority on using barcode technology to reduce medical errors for better patient safety. The technology has helped solve many human errors. For example, the US Department of Health and Human Services has stated the use of barcodes has reduced medication error rates by as much as 85 percent.  To those in the barcode industry, it is well known that the technology helps improve workflow and efficiency.  This is true across a myriad of industries, but in the medical field it can also help save lives.  So, what do technical staff need to consider to ensure a successful implementation of barcode technology in their healthcare practice?

This article will detail five tips for implementing barcodes in medical records management applications. This includes managing documents such as order requisitions, test results, and patient charts / medical records. The tips will cover technical and workflow considerations. 

Really understand the software platform

Learn the detailed platform requirements of the Electronic Health Records (EHR) system you use or plan to use. This includes any desktop, web or mobile application, or combination of any of these.  For an example, let’s look at a potential platform requirement for a web-based application. If it’s web-based, you’ll want to identify what browser types the application needs to support. This includes determining if users will be required to maintain a minimum browser type or version. For example, will your web-based application work only on IE version 9 or later? Or, is it important that you support other browsers too: Chrome, Firefox, Safari, Opera, and so on? Ensuring support for browsers will help guarantee continuous workflow and reduce support issues. Once you understand this requirement you can proceed with a corresponding barcode application programming interface (API) to save you development time. There are some open source barcode libraries available. A popular one is ZXing, also known as “Zebra Crossing”). You might instead opt for a third party barcode software development kit (SDK). Commercial SDKs typically provide better barcode processing results, wider barcode type support, and better customer service. Obviously they can also save on development time and costs versus researching, understanding, identifying, creating and supporting an API you built in-house.

Read More>>

What Can Be Done Within 10 Minutes [Infographic]

10 minutes to-do

 

 

How to convert a PDF file to an image and extract text from it in a .NET desktop app

Recently, several customers have asked us if it’s possible to use Dynamic .NET TWAIN to convert a PDF file to an image, and then extract text from it, all in a .NET desktop app. In this article I’ll provide some samples that show how to do this using Dynamic .NET TWAIN and our PDF Rasterizer and OCR add-ons. The solution works in both WinForms and WPF.

All the samples provided below (both C# and VB.NET) are included in the 30-day free trial installer of Dynamic .NET TWAIN.

Read a PDF file and convert it to image

PDF Rasterizer

With the PDF Rasterizer add-on of Dynamic .NET TWAIN, you can load PDF files from your local disk as images, then display them in the Dynamic .NET TWAIN viewer. You can also specify a resolution for the image.

C# code snippet

        private void btnLoadPDF_Click(object sender, EventArgs e)
        {
            try
            {
                OpenFileDialog openfiledlg = new OpenFileDialog();
                openfiledlg.Filter = "PDF|*.PDF";
                openfiledlg.FilterIndex = 0;
                openfiledlg.Multiselect = true;

                if (openfiledlg.ShowDialog() == DialogResult.OK)
                {
                    foreach (string strfilename in openfiledlg.FileNames)
                    {
                        this.dynamicDotNetTwain1.ConvertPDFToImage(strfilename, float.Parse(cmbPDFResolution.SelectedItem.ToString()));
                    }
                }
            }
            catch(Exception exp)
            {
                MessageBox.Show(exp.Message);
            }
        }

Perform OCR

With the OCR add-on of Dynamic .NET TWAIN, you can extract text from images and save the OCR result in a text  or PDF file (text or image over text) in your .NET application.  The .NET OCR SDK supports  40+ languages, including Arabic, Chinese and more.

C# code snippet

private void OCR(bool isOcrOnRectangleArea)
        {
            string languageFolder = m_strCurrentDirectory;
            if (m_bSamplesExist)
            {
                languageFolder = m_strCurrentDirectory + @"Samples\Bin\"; 
            }
            //specify the tessdata folder with the language package
            this.dynamicDotNetTwain1.OCRTessDataPath = languageFolder;
            //specify the language for OCR
            this.dynamicDotNetTwain1.OCRLanguage = languages[this.cbxOCRLanguage.Text]; 
            //specify the file format to store OCR result: text file, text or image over text PDF file
            this.dynamicDotNetTwain1.OCRResultFormat = (Dynamsoft.DotNet.TWAIN.OCR.ResultFormat)this.ddlResultFormat.SelectedIndex;


            string strDllPath = m_strCurrentDirectory;
            if (m_bSamplesExist)
            {
                strDllPath = m_strCurrentDirectory + @"Redistributable\OCRResources\";
            }

            this.dynamicDotNetTwain1.OCRDllPath = strDllPath; 


            if (this.dynamicDotNetTwain1.CurrentImageIndexInBuffer < 0)
            {
                MessageBox.Show("Please load an image before doing OCR!", "Index out of bounds", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            byte[] sbytes = null;
            if (!isOcrOnRectangleArea)
                sbytes = this.dynamicDotNetTwain1.OCR(this.dynamicDotNetTwain1.CurrentSelectedImageIndicesInBuffer);
            else
                sbytes = this.dynamicDotNetTwain1.OCR(dynamicDotNetTwain1.CurrentImageIndexInBuffer, int.Parse(tbxLeft.Text),
                    int.Parse(tbxTop.Text), int.Parse(tbxRight.Text), int.Parse(tbxButtom.Text));

            if (sbytes != null && sbytes.Length > 0)
            {
                SaveFileDialog filedlg = new SaveFileDialog();
                if (this.ddlResultFormat.SelectedIndex != 0)
                {
                    filedlg.Filter = "PDF File(*.pdf)| *.pdf";
                }
                else
                {
                    filedlg.Filter = "Text File(*.txt)| *.txt";
                }
                if (filedlg.ShowDialog() == DialogResult.OK)
                {                   
                    File.WriteAllBytes(filedlg.FileName, sbytes);    
                }
            }
            else
            {
                if(this.dynamicDotNetTwain1.ErrorCode != 0)
                    MessageBox.Show(this.dynamicDotNetTwain1.ErrorString);
            }
        }

Get samples

You can download and try the .NET PDF samples above from the Dynamsoft sample gallery.

Copyright © 2013 Dynamsoft. All Rights Reserved. Privacy Statement | Site Map
The leading provider of version control solutions and TWAIN SDKs
  • Sign into hosted web portal
  • Contact us
Dynamic Web TWAIN - TWAIN ActiveX | Web Scanning Control