changed logic in ocr
This commit is contained in:
@@ -344,10 +344,11 @@ class OcrValidationResource extends Resource
|
||||
$pdf->Rect($qrSlots[$i]['x']-1, $qrSlots[$i]['y']-1, $qrSlots[$i]['size']+2, $qrSlots[$i]['size']+2, 'F');
|
||||
|
||||
// Generate new QR code
|
||||
$qrPath = storage_path("app/private/uploads/QR/qr_$serial.svg");
|
||||
$qrPath = storage_path("app/private/uploads/QR/qr_$serial.png");
|
||||
$qrDir = storage_path('app/private/uploads/QR');
|
||||
if (!file_exists($qrDir)) mkdir($qrDir, 0777, true);
|
||||
QrCode::format('svg')->size(100)->generate($serial, $qrPath);
|
||||
//QrCode::format('svg')->size(100)->generate($serial, $qrPath);
|
||||
QrCode::format('png')->size(300)->errorCorrection('H')->generate($serial, $qrPath);
|
||||
|
||||
// Place QR code
|
||||
$pdf->Image($qrPath, $qrSlots[$i]['x'], $qrSlots[$i]['y'], $qrSlots[$i]['size'], $qrSlots[$i]['size']);
|
||||
|
||||
Reference in New Issue
Block a user