Search code examples
c#pdfghostscriptbmptessnet2

c# PDF to Bmp for free


I am writing a program that uses OCR (tessnet2) to scan an image file and extract certain information. This was easy before I found out that I was going to be scanning attachments of PDFs from an Exchange server.

The first problem I am working on is how to convert my PDFs to BMP files. From what I can tell so far of TessNet2, it can only read in image files - specifically BMP. So I am now tasked with converting a PDF of indeterminate size (2 - 15 pages) to BMP image. After that is done I can easily scan each image using the code I have built already with TessNet2.

I have seen things using Ghostscript to do this task - i'm just wondering if there was another free solution or if one of you fine humans could give me a crash course on how to do this using Ghostscript.


Solution

  • Found a CodeProject article on converting PDFs to Images:

    http://www.codeproject.com/Articles/57100/Simple-and-Free-PDF-to-Image-Conversion