我正在使用tcpdf,并且在我的tcpdf中放置了QR码。即使我已经初始化了qr代码的大小并在我的tcpdf代码中调整了大小,我似乎也无法调整qr代码的大小。看一下我的控制器。
$configure['cacheable'] = TRUE; //boolean, the default is true
$configure['cachedir'] = './assets/'; //string, the default is
application/cache/
$configure['errorlog'] = './assets/'; //string, the default is
application/logs/
$configure['imagedir'] = './assets/eventQrcode/';
$configure['quality'] = TRUE; //boolean, the default is true
$configure['size'] = '1024'; //integer, the default is 1024
$config['overwrite'] = TRUE;
$configure['width'] = '500';
$configure['height'] = '500';
$configure['black'] = array(224,255,255); // array, default is
array(255,255,255)
$configure['white'] = array(70,130,180); // array, default is
array(0,0,0)
$this->ciqrcode->initialize($configure);
$image_name2 = $activityNaming.'.png';
$image_name = preg_replace("/ /", "-", $image_name2);
$codeContents = $activityNaming. ";" .$actId;
$params['data'] = $codeContents;
$params['level'] = 'H'; //H=High
// $params['width'] = 500;
// $params['height'] = 500;
$params['size'] = '10';
// $params['size'] = '25';
$params['savename'] = FCPATH.$configure['imagedir'].$image_name;
$this->ciqrcode->generate($params);
$this->User_model->SubmitQr($image_name, $activityId);
现在这是我的tcpdf代码。
$pdf->Image($imagebefore, '', '', 500, 500, 'PNG', '', 'C', true, 300,
'',false, false, 0, false, false, false, false);
$pdf->Image('@' . $imagebefore);