Read Barcodes from PDF Documents

Read Barcodes from PDF Files

This example performs two tasks:

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

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.