Hello,
I am generating a QR code using this library and registering this QR code in a folder.
The background of this QR code is constantly white and I have to open it manually later using software such as CorelDraw - Illustrator and delete it.
Is there a way to automatically produce this without a white background, ie transparent?
My codes;
use BaconQrCode\Renderer\Image\Svg;
use BaconQrCode\Writer;
use BaconQrCode\Renderer\Color\Cmyk;
function utf8Encode($string) {
return iconv(mb_detect_encoding($string, mb_detect_order(), true), 'UTF-8', $string);
}
$qrCodeContent = utf8Encode("BEGIN:VCARD\nVERSION:3.0\nN:". $name ." ". $surname ."\nEMAIL:$email\nTEL;TYPE=CELL:$gsmno\nTEL;TYPE=WORK:$is_telefonu\nURL:$website\nADR:". $ofisadres ."\nEND:VCARD");
$renderer = new Svg();
$renderer->setForegroundColor(new Cmyk(0, 0, 0, 100));
$writer = new Writer($renderer);
$qrCodeSvg = $writer->writeString($qrCodeContent);
$filename = ''. $username .'.svg';
$path = 'qr/' . $filename;
file_put_contents($path, $qrCodeSvg);
Hello, I am generating a QR code using this library and registering this QR code in a folder. The background of this QR code is constantly white and I have to open it manually later using software such as CorelDraw - Illustrator and delete it. Is there a way to automatically produce this without a white background, ie transparent?
My codes;