Folder Monitor: 25 Projects in 25 Days

This is the first project in a series of examples created by the LEADTOOLS Support Department. As part of the LEAD Technologies 25th anniversary, we are creating 25 projects in 25 days to celebrate LEAD’s depth of features and ease of use. Today’s project comes from Aaron.

What it Does

This C# console application monitors a directory and converts all the files pasted or dropped into the directory to searchable PDF files using LEADTOOLS Version 19.

Features Used

Development Progress Journal

Hello, my name is Aaron I am going to write a C# sample console application that continuously watches a directory and converts all files that are pasted or dropped into this directory into searchable PDF files using the LEADTOOLS Document Converter Toolkit.

When thinking about how I was going to write this application, I decided it would be a nice addition to show how the application could be run using a Windows Service. I am going to use our OCR Advantage Engine to recognize the document so I can save it as a searchable PDF file.
Documentation: IOcrEngine

I have finished setting up the application to continuously monitor a certain directory that is created when the application starts. This took about half an hour.

I am now starting to implement the OCR Advantage Engine and loading the input file into an OCR Document.
Documentation: IOcrDocument

I have completed implementing these features but while doing some testing with this functionality I realized I was missing some required codecs for certain files. I added the needed codecs to the project. This took about an hour.
Documentation: Files to be Included With Your Application

I will now begin implementing the OCR Document recognition and saving the OCR Document as a searchable PDF file. This took about fifteen minutes.

It took about fifteen minutes to implement the recognition and saving. My application is mostly complete now. I am beginning to do some sanity testing and making sure I have all the necessary comments in my code. This took about half an hour.

It took about half an hour to sanity test and finish commenting my code. I have completed the main application (Folder Monitor) and I will now begin setting up the application for inserting this application into a Windows Service. I originally planned to put the entire application in a Windows Service but it seems that would require modifying your registry to increase the timeout for loading a Windows Service, since it takes a while to load the application, so I just simply wrapped the FolderMonitor.exe into the Windows Service.

I have completed setting up the Windows Service for this application. If you wish to test the application using a Windows Service, I have included a readme on how to set it up.

My application is now ready to deploy. It took me a total of 4 hours. Without LEADTOOLS, this would have taken me weeks just to convert the files to searchable PDF files.

Download the Project

The source code for this sample project can be downloaded from here. To run the project, extract it to the C:\LEADTOOLS 19\Examples\DotNet\CS directory.

This entry was posted in Document Imaging and tagged , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *