标签:require 图片转pdf dem sep rar 依赖 include dirname tar
目的:图片转pdf(image2pdf)
依赖:fpdf.php
网址 为 http://fpdf.org/ 有文档和包
demo:
step 1 :
First download fpdf library class from here http://fpdf.org/
step 2 :
Take the file “fpdf.php” from downloaded file
step 3 :
1 // write this code on your file say example.php 2 // include fpdf library class 3 require(‘fpdf.php’); 4 $image = dirname(__FILE__).DIRECTORY_SEPARATOR.’my_image.png’; 5 $pdf = new FPDF(); 6 $pdf->AddPage(); 7 $pdf->Image($image,20,40,170,170); 8 $pdf->Output();
标签:require 图片转pdf dem sep rar 依赖 include dirname tar
原文地址:https://www.cnblogs.com/dishiao/p/12052830.html