barcode icon indicating copy to clipboard operation
barcode copied to clipboard

Change "title" of QR

Open xcalabuig opened this issue 3 years ago • 1 comments

When using QR the result image filename is the first parameter, in this case the 'url'. How to sepparate the filename to the url which should redirect QR? It's possible?

$qr = new DNS2D();
$qr->setStorPath(base_path('public/storage/qrcodes/'));
$qr->getBarcodePNGPath($url, 'QRCODE', 50, 50);

xcalabuig avatar Jun 02 '22 09:06 xcalabuig

$qr = new DNS2D();
$bytes = base64_decode($qr->getBarcodePNG($url, 'QRCODE', 50, 50));
file_put_contents(base_path('public/storage/qrcodes/my_filename.png'), $bytes);

angeljqv avatar Jul 08 '25 22:07 angeljqv