0

I have a PDF file which contains just 1 Page. I have a barcode at the end of the page. How do I extract the barcode number from the PDF in C#

I have seen a post to convert barcode Image to Code 39 but how do we do it from PDF, Please help barcode image to Code39 conversion in C#?

Thanks

Community
  • 1
  • 1
acadia
  • 2,619
  • 18
  • 55
  • 72

2 Answers2

0

Your best bet is to get a PDF library that can extract images from the pages. We use Aspose.PDF and Aspose.PDF.Kit, which are both excellent products.

http://www.aspose.com

This page shows a code example of how to extract an image from a PDF document:

http://www.aspose.com/documentation/.net-components/aspose.pdf.kit-for-.net/extract-image-from-pdf-document.html

They also have a Barcode library, and one of the things it can do is read barcodes from multi-page tiff images. You could convert the pages of your PDF to TIFF and then use the barcode library to read the barcodes:

http://www.aspose.com/documentation/.net-components/aspose.barcode-for-.net/how-to-read-barcode-from-multipage-tiff-images.html

camainc
  • 3,750
  • 7
  • 35
  • 46
0

You can use iTextSharp library to convert the PDF to an image and then a barcode reading library such as IBScanner to extract the barcode(s) from the image.

Angelo
  • 145
  • 2
  • 9