脚本宝典收集整理的这篇文章主要介绍了php – WKHTMLtoPDF头文件内容未以PDF格式显示,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
// Create document PDF $pdf = new $this->wkhtmltopdf; // Locate WkHtmlToPdf executable for Windows if( $pdf->getIsWindows() ) { $pdf->setOptions( array( 'binPath' => 'C:\PRogram Files\wkhtmltopdf\bin\wkhtmltopdf.exe','no-outline','encoding' => 'UTF-8','margin-top' => 30,'margin-right' => 20,'margin-bottom' => 30,'margin-left' => 20,// Default page options 'disable-smart-shrinking','user-style-sheet' => 'pdf.css','header-html' => dirname(__FILE__) . '\..\views\wkhtmltopdf\header.html' ) ); } // Generate document fields $docInputs = $this->generate_inputs( $inputs,json_decode( $this->load->file( APPPATH . '/mapping/' . $document['mapping'],TRUE ),TRUE ) ); // Merge document fields into HTML exported Word files $docHTML = $this->parser->parse( 'docs/' . $document['html'],$docInputs,TRUE ); // Add HTML as page,along with option for page header $pdf->addPage( $docHTML,array( 'header-center' => '[[page]]','header-spacing' => '10','header-font-name' => 'Times New roman' ) );
以上是脚本宝典为你收集整理的php – WKHTMLtoPDF头文件内容未以PDF格式显示全部内容,希望文章能够帮你解决php – WKHTMLtoPDF头文件内容未以PDF格式显示所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。