[英]Add barcode in Form Fillable PDF
I have implemented following code which fills the fields within PDF. 我实现了以下代码,这些代码填充了PDF中的字段。 I am using http://www.fpdf.org/en/script/script93.php for filling PDF form. 我正在使用http://www.fpdf.org/en/script/script93.php填写PDF表单。
Now i want to add the barcode in to pdf. 现在我想将条形码添加到pdf中。 For creating barcode i am using https://github.com/davidscotttufts/php-barcode/ . 为了创建条形码,我正在使用https://github.com/davidscotttufts/php-barcode/ 。
<?php
require('fpdm.php');
$useName = "User-Name";
$barCode = '<img alt="testing" src="barcode.php?text='.$useName.'" />';
$fields = array(
'name' => 'UserName',
'address' => 'Address Here',
'city' => 'City Here',
'phone' => '999999999'
);
$pdf = new FPDM('userFormPdf.pdf');
$pdf->Load($fields, false);
$pdf->Merge();
$pdf->Output();
?>
I just want to add the barcode in pdf file. 我只想在pdf文件中添加条形码。 Does any one have idea how to do it. 是否有人知道该怎么做。
You can refer to link bellow : 您可以参考以下链接:
http://www.asudahlah.com/2018/04/how-to-add-barcode-to-pdf-created-with.html http://www.asudahlah.com/2018/04/how-to-add-barcode-to-pdf-created-with.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.