Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Email 如何通过系统命令使用wkhtmltopdf保存生成的pdf文件_Email_Pdf_Wkhtmltopdf - Fatal编程技术网

Email 如何通过系统命令使用wkhtmltopdf保存生成的pdf文件

Email 如何通过系统命令使用wkhtmltopdf保存生成的pdf文件,email,pdf,wkhtmltopdf,Email,Pdf,Wkhtmltopdf,您好,我能够从html页面生成pdf文件使用wkhtmltopdf库。我通过系统命令生成pdf文件,不使用php和方法 $command = "wkhtmltopdf\wkhtmltopdf --page-size Letter ".$myFile." ".$outfile; system($command); 现在我想将生成的pdf文件作为电子邮件的附件。为此,我必须使用系统命令将pdf报告保存到本地目录我该怎么做?这是一种方法: 更好、更简单的方法是使用Zend framework(Ze

您好,我能够从html页面生成pdf文件使用wkhtmltopdf库。我通过系统命令生成pdf文件,不使用php和方法

$command = "wkhtmltopdf\wkhtmltopdf --page-size Letter ".$myFile." ".$outfile;
system($command);
现在我想将生成的pdf文件作为电子邮件的附件。为此,我必须使用系统命令将pdf报告保存到本地目录<代码>我该怎么做?

这是一种方法:

更好、更简单的方法是使用Zend framework(Zend_mail)这样的框架:

将输出文件路径作为最后一个参数

/usr/local/bin/wkhtmltopdf-页面大小“A4”-视口大小2480x3508-页边顶部“10”-页边底部“10”-页边右侧“0”-页眉间距“1”-页脚间距“0”pdfoutputFile.pdf