Skip to content

Add the ability to set margins #123

@nicolasvac

Description

@nicolasvac

Hello everyone, we are actively using this library to generate barcodes, and we found out that some mobile devices have troubles reading it because there is no ability to set margins around the image, to give a bit of space before starting to read the lines.

While i know a simple solution like this can be applied:

      $generatedImage = new Imagick();
      $generatedImage->readImageBlob($barcodeGenerator->getBarcode(xx));
      $generatedImage->borderImage('white', 20, 20);

      $barcode = $generatedImage->getImageBlob();

It would be nice to have the ability for both SVG, PNG and JPG to set the margins.
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions