Getting started with PHP Barcode

22 Apr 20212 minutes to read

The Syncfusion Essential JS Barcode widget enables rendering of one dimension and two dimension barcodes in web page. Barcode provides you a simple and inexpensive method of encoding text information that can be easily read by electronic readers.

Key Features

  • Supports 10 one-dimensional barcodes including Code 39 and Code 32 barcodes.
  • Supports 2 two-dimensional barcodes such as QR and Data Matrix barcodes.

Getting Started

This section explains briefly about how to create a Barcode control in your application with PHP wrapper classes of EJ controls.

Create your first Barcode in PHP

1.Create an HTML file and add the following necessary scripts and CSS files to the HTML file.

  • HTML
  • <!DOCTYPE html>
        <html xmlns="">
                <meta name="viewport"content="width=device-width, initial-scale=1.0"/>
                <meta charset="utf-8" />
                <link href="" rel="stylesheet"/>
                <script src=""></script>
                <script src=""></script>
                <script src=""></script>
                <script src=""></script>
                <script src="" type="text/javascript"></script>
            <!--Add Barcode control here -->

    2.Render the PHP Barcode control as show below.

  • JS
  • <body>
            $barcode = new EJ\Barcode("Barcode");
            echo $barcode->symbologyType('qrbarcode')->text('')->render();

    The following screenshot illustrates the output of the above code example.

    PHP Barcode Getting Started Image