Barcode Bakery Blog

Detailed Barcode Tutorials

Author: Joshua Ganyon

Announcing Barcode Generator PHP 8 Support

We have recently updated all of our libraries to support the latest version of PHP. Our library works with most configurations and with error_reporting set to E_ALL.


We recommend updating to PHP 8. Presently, you can still use PHP 7. However, it will no longer be supported at the end of November 2021.


For more information about our products, please visit

To get access to these updates, please purchase a license here:

We’re here to help answer any of your questions at

Announcing Barcode Generator PHP 7 Support

Barcode Bakery’s latest release provides updates to support PHP 7 and includes several improvements that make working with our libraries easier than ever:

  • Namespace has been implemented. Instead of all classes being in the global namespace, barcode libraries can be found in the namespace BarcodeBakery\Barcode.
  • Barcode Bakery is now PSR-2 compliant, so the formatting is uniform with other PSR-2 compliant libraries.
  • Barcode Generator by Barcode Bakery is now PSR-4 compliant. You can now take advantage of autoloading of classes and no longer need to manually include files.
  • Barcode Generator libraries can now be installed using Composer.
  • Label placement has been adjusted for PHP7 to make custom placements simpler.
  • MaxiCode quiet zone issues have been fixed.
  • Various QR Code symbols have been updated.

The Barcode Bakery team is excited to offer these improvements that make our barcode generator libraries for 1D and 2D quicker, simpler, even more reliable and more consistent.

For more information about our products, please visit

To get access to these updates, please purchase a license here:

We’re here to help answer any of your questions at

Encoding Special Characters

In many cases, our users may need to insert special characters like carriage returns and functions into their barcodes. Each symbology’s ISO standards dictate which characters can be encoded into a barcode and these characters are outlined on our website under each symbology’s respective user manual page. For a step-by-step guide to choosing the correct type of barcode for your project, have a look at our previous post, Choosing the Right Barcode.


How to Insert Special Characters with ASCII Codes


Many special characters can be encoded using Barcode Bakery simply by using PHP’s chr function. The decimal code associated with each special character can be located using an ASCII table and then passed to the function. For example, to insert a carriage return, you’ll want to use chr(13) as follows:

$code->parse(“hello” . chr(13) . “new line”);


This use of the carriage return is useful when a barcode will be scanned to populate a single-input multi-line form such as a text area. If a tab character is required, such as when a barcode will be scanned to populate a form with multiple text inputs, then chr(9) would be used.


How to Insert FNC1 with setTilde()


For certain symbologies such as DataMatrix that allow the FNC1 character, the setTilde() method should be used. By setting its value to true, the tilde character can then be used to insert FNC1 by inserting ~F  into a string. This character is used in most cases to enter a different mode specific to each barcode type.


To find more information about which barcode symbologies can accommodate the special characters you require, check out our user guides in the resources found on our website:

Create Barcodes Using ASP.NET has recently been updated to provide even more of the popular barcode symbologies already found on We offer the leading barcode generation software for ASP.NET. The code we have developed can be implemented and modified to suit almost any barcoding need. Our website provides ample resources in the form of manuals, user guides and informative blog postings so you can begin generating barcodes as efficiently as possible according to your desired specifications.

Our ASP.NET and PHP software can dramatically increase both personal and commercial productivity. Barcodes can be implemented in a variety of ways: from streamlining shipping to box-office ticketing, all while reducing resource loss. Automating the creation of barcodes means that manual data input can be reduced or eliminated, saving your industry time and money.

ASP.NET can be run on Windows. If your company is using the .NET technology, you can now take advantage of Barcode Generator.

© 2024 Barcode Bakery Blog

Theme by Anders NorenUp ↑