Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to set margins #123

Open
nicolasvac opened this issue Jan 21, 2021 · 2 comments
Open

Add the ability to set margins #123

nicolasvac opened this issue Jan 21, 2021 · 2 comments

Comments

@nicolasvac
Copy link

nicolasvac commented Jan 21, 2021

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.

@casperbakker
Copy link
Member

Yes that would be nice. I think the current interface does not work for these kind of options. But I am exploring options to divide the barcode encoding and the image rendering parts. That would make it easier to differentiate the image renderers.

@osflake
Copy link

osflake commented May 23, 2024

Any changes? Please @casperbakker some feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants