Answers for "php fpdf add qr code"

PHP
0

php fpdf add qr code

<?php
//include the libraries
require_once("fpdf17/fpdf.php");
require_once("phpqrcode/qrlib.php");

//create a QR Code and save it as a png image file named test.png
QRcode::png("coded number here","test.png");

//pdf stuff
$pdf = new FPDF('P','mm','A4');
$pdf->AddPage();

//this is the first method
$pdf->Image("http://localhost/pdf/qr_generator.php?code=content here", 10, 10, 20, 20, "png");

//this is the second method
$pdf->Image("test.png", 40, 10, 20, 20, "png");

//and absolutely don't forget this one
$pdf->Output();
Posted by: Guest on October-08-2021

Browse Popular Code Answers by Language