0
我使用http://www.ashberg.de/php-barcode/脚本来生成条形码。我现在需要从HTML中将条形码导入到PDF中。 (IM使用html2pdf_v4.03为HTML - > PDF)php image保存到目录并保存到pdf
<div style=" display:inline;"><img id='barcode' alt='barcode' src="scripts/barcode/barcode.php?mode=jpg" /></div>
的作品,但是当我将其导入到PDF它的错误。所以我决定尝试生成条形码并将其保存为img格式,并在html中引用它,然后转换为PDF。
所以,我想
file_put_contents('scripts/barcode.jpg', file_get_contents('scripts/barcode/barcode.php?mode=jpg'));
和我未能打开流:错误
,如果我尝试
file_put_contents('scripts/barcode.jpg', file_get_contents('scripts/barcode/barcode.php'));
它运行,但图像文件,它会创建无法读取/破。
请协助?