How to Read Barcode from PDF Documents

Recognizing Barcodes from PDF Files

The examples performs two tasks:

  1. Generates a PDF file with a barcode in it.
  2. Recognizes the barcode in the PDF.

The code sample below does both tasks in one go.

Generate Barcode and Insert in PDF Document

  1. Use Aspose.BarCode for Java to generate a barcode image.
  2. save the image to disk.
  3. Use Aspose.PdF for Java to create an Adobe PDF document and insert this barcode into it.

Extract Images from PDF Document and Read Barcodes

  1. Extract images from the PDF document using Aspose.Pdf.Kit for Java.
  2. Pass the images to Aspose.BarCode for Java for barcode recognition.

The code example given below is a complete Java program that generates and recognizes barcodes from Adobe PDF documents.