Wanted to know how I can increase the quality and size and possibly error correction for Barcode, QR Code in particular.
Recently started to play with "VCard" and planning to share it once it is complete, it is a feature I'm adding to the CRM so that I can Scan a single Contact and add it to phone. The issue is that the QR code is too low quality and it can't scan at all on my phone. Even try using the a software reader on Desktop thinking it cause my phone camera suck but even software can't decode it.
For my test QR total character is: 338 characters total, a sample of it can be found below with a (draft QR Code);
Update 2:
Digging through the code I found this:
https://github.com/espocrm/espocrm/c...c6b5fbbb58a43f
"QRcode" => 'QRCODE,H',
Currently it is already set as "H", reading this website it mean High error correction so I guess there isn't much else we can do for that. ( https://www.qrcode.com/en/about/error_correction.html )
So I guess the question would be, how to increase the quality/size of the image so it isn't blurry.
Something about Module and Version on this page: https://www.qrcode.com/en/about/version.html
Reading more of the code I found this line: for this file: application/Espo/Core/Htmlizer/Htmlizer.php
$context['hash']['height'] ?? 40,
I guess I just need to increase that to maybe 100 and 100 and see how it goes? So the next question would be, how to make it update safe? And that is where I think I will be stuck.
Update 3:
And the result of my theory? Incorrect, change it to 140, clear cache, re-test it but it size still seem to be the same; hopefully an expert can help
$context['hash']['height'] ?? 140,
Recently started to play with "VCard" and planning to share it once it is complete, it is a feature I'm adding to the CRM so that I can Scan a single Contact and add it to phone. The issue is that the QR code is too low quality and it can't scan at all on my phone. Even try using the a software reader on Desktop thinking it cause my phone camera suck but even software can't decode it.
For my test QR total character is: 338 characters total, a sample of it can be found below with a (draft QR Code);
Code:
// QR Code to Scan Contact barcodeContactQR=string\concatenate( "BEGIN:VCARD", '\n', "VERSION:2.1", '\n', "N:Gump;Forrest;;Mr.", '\n', "EMAIL:forrestgump@example.com", '\n', "TEL;WORK;VOICE: 111 555-1212", '\n', "ADR;WORK;PREF:;;100 Waters Edge;Baytown;LA;30314;United States of America", '\n', "FN:Forrest Gump", '\n', "ORG:Bubba Gump Shrimp Co.", '\n', "TITLE:Shrimp Man", '\n', "END:VCARD" ); //End QR Code
Digging through the code I found this:
https://github.com/espocrm/espocrm/c...c6b5fbbb58a43f
"QRcode" => 'QRCODE,H',
Currently it is already set as "H", reading this website it mean High error correction so I guess there isn't much else we can do for that. ( https://www.qrcode.com/en/about/error_correction.html )
So I guess the question would be, how to increase the quality/size of the image so it isn't blurry.
Something about Module and Version on this page: https://www.qrcode.com/en/about/version.html
Reading more of the code I found this line: for this file: application/Espo/Core/Htmlizer/Htmlizer.php
$context['hash']['width'] ?? 40, |
I guess I just need to increase that to maybe 100 and 100 and see how it goes? So the next question would be, how to make it update safe? And that is where I think I will be stuck.
Update 3:
And the result of my theory? Incorrect, change it to 140, clear cache, re-test it but it size still seem to be the same; hopefully an expert can help
$context['hash']['width'] ?? 140, |
Comment