Reliable decoding for real-world scans

In production you rarely get perfect labels. This SDK is designed to read barcodes at different angles and across common image quality issues. You can tune recognition settings to balance speed and accuracy and target specific scan regions when you need extra throughput.

Standards? Covered.

Aspose.BarCode for PHP via Java supports all major image formats, including vector formats like SVG and EMF, as well as PDF. Use our API to recognize files from scanners or cameras with ease. Here are all supported barcode symbologies, including 1D, 2D, postal, and composite types. Each one can be generated and recognized across all supported platforms.

Matrix / 2D Codes

  • QR Code, MicroQR, rMQR
  • Data Matrix, Industrial Data Matrix (DPM)
  • Aztec
  • Han Xin
  • MaxiCode
  • DotCode

Linear / 1D Codes

  • UPCA, UPCE
  • EAN13, EAN14, EAN8
  • Code 128
  • DataBar
  • ITF
  • Postal

Industry & Composite Codes

  • GS1
  • ECI
  • Composite barcodes
  • HIBC
  • SwissQR
  • Royal Mailmark

Requirements and deployment

Aspose.BarCode for PHP via Java is platform-independent and runs anywhere PHP and Java are available, including Windows, Linux, macOS, and Solaris. System requirements are PHP 7.4+ and JDK 1.8+. Install via Composer (aspose/barcode) and enable the PHP GD extension. For runtime, start the included Java Apache Thrift server using the provided scripts (start_server.cmd or start_server.sh). This model works well for headless servers, PHP-FPM, and common NGINX or Apache deployments.

Microsoft Windows
Linux
macOS
Intellij Idea
PhpStorm
VS Code
Docker
GitHub

Live Code Demo

Paste text → get a barcode. Drop a file → get decoded data. Both examples come with auto-generated sample code so you can copy straight into your project.


// Initialize BarcodeGenerator $gen = new BarcodeGenerator(EncodeTypes::QR, "1234567"); // Set generation parameters $gen->getParameters()->getBarcode()->getXDimension()->setPixels(7); $gen->getParameters()->getBorder()->setColor("#000000"); $gen->getParameters()->getBorder()->getWidth()->setPixels(7); // Generate and save Barcode image $gen->save("image.png", BarCodeImageFormat::PNG);

// Initialize BarCodeReader $reader = new BarCodeReader("image.png", DecodeType::QR); // Set recognition quality $reader->setQualitySettings(QualitySettings::getHighPerformance()); // Recognize barcodes and output results $res = $reader->readBarCodes(); echo "Recognized " . count($res) . " barcode(s)\n"; foreach ($res as $r) { echo $r->getCodeTypeName() . ": " . $r->getCodeText() . "\n"; }

Barcodes for commerce, labels, and documents in PHP

Build end-to-end barcode workflows in PHP, from order processing to shipping labels and invoices. Generate, validate, and read codes used across retail, logistics, finance, healthcare, and ticketing.

Web-first generation

  • Generate server-side images (PNG, JPEG, TIFF, BMP, GIF, EXIF) and vector outputs (SVG, EMF) for PDFs, receipts, and labels
  • Return Base64 images to the browser or store results in object storage
  • Template-friendly output: control X-dimension, margins, rotation, captions, and resolution
  • Batch processing: queue images for high-volume jobs

Recognition for files and streams

  • Read linear, 2D, and postal barcodes from scans, mobile photos, and generated documents
  • Tune speed vs accuracy for your workload and detect small, rotated, or low-contrast symbols
  • Use scan regions and return metadata such as the barcode type and orientation

GS1 and business-critical types

  • Retail: EAN/UPC, Code 128 (including GS1-128), ITF, Code 39, Code 93
  • 2D labels and tickets: Data Matrix, QR, Micro QR, Aztec, PDF417
  • Invoices and payments: Swiss QR with structured payloads
  • Logistics and operations: GS1 DataBar variants and postal families

Performance and operations

  • Run the Java backend as a long-lived process for steady throughput under PHP-FPM
  • Scale horizontally behind NGINX or Apache and deploy in containers

International text, standards, and developer ergonomics

Feature icon

International text and ECI support

Encode and decode multilingual content using features like ECI where applicable. This helps keep text consistent across scanners and regions.

Feature icon

Standards and structured payloads

Build GS1-compliant data and work with advanced barcode modes. Use complex barcode helpers for cases like Swiss QR and other structured formats supported by the API.

Feature icon

Composer install and predictable runtime

Install with Composer and run the included Java Apache Thrift server with provided scripts. This keeps behavior consistent across dev, CI, and production.