PHP mPDF QR-Code: How to control the auto-generated QR-Code-border?

Viewed 6731

To meet given requirements, we are asked to alter the auto-generated QR-Code-border. We’ve searched a lot for describing resources and tested a view guesses but ended up with no working solution. Our best shot was simply CSS, but it just adds an additional border and does not replace the element’s default one. We’ve also tried border="0" or border="false" within the calling HTML-snippet, but this has no effect on the actual output. Furthermore, we would be interested in adding attributes like line-width & -style, color, border-radius, padding and so on.

Additional info: To create QR-Codes within the UTF-8 coded HTML we use code snippets like:

<barcode code="Text goes here" size="0.8" type="QR" error="M" class="barcode" />
1 Answers

Since v7.0.0 there is a disableborder="1" attribute achieving this.


See Issue #368:

There is currently no way to achieve this with standard mPDF use.

Well…

It's actually a 7-line change in the code allowing use of a disableborder="1" HTML attribute which should make it work as you need. See above.

Related