Working with Image Borders in PHP

Aspose.BarCode - Working with Image Borders

To Work with Image Borders using Aspose.Barcode Java for PHP, simply invoke SetBarcodeImageBorders module. Here you can see example code.

PHP Code

 # Instantiate barcode object

$bb = new BarCodeBuilder();

$margins = new MarginsF();

\# 6 milimeter space from left, right, top and bottom side of border





\# Set border's width to be 0.5 milimeter


\# Border will be visible


\# Set the border's color to red

$color=new Color();


\# Set margins


$bb->save($dataDir . "border.jpg");

\# Display Status.

print "Set border margins, please check the output file.".PHP_EOL;

Download Running Code

Download Working with Image Borders (Aspose.BarCode) from any of the below mentioned social coding sites: