-1
A
回答
0
我在里面创建覆盖工具文件夹,我把我们dompdf-master在这里找到https://github.com/dompdf/dompdf。
取而代之覆盖/ classes/pdf我复制PDFGenerator.php,有类/ pdf。
在PDFGenerator.php添加:
require_once('/../override/tools/dompdf-master/dompdf/Dompdf.php');
require_once('/../override/tools/dompdf-master/autoload.inc.php');
include('/../override/tools/dompdf-master/dompdf/dompdf_config.inc.php');
use Dompdf\Dompdf;
use Dompdf\Options;
类变为:
class PDFGenerator extends DOMPDF
消除渲染()函数和其替换为:
public function render($filename, $display = true)
{
if (empty($filename)) {
throw new PrestaShopException('Missing filename.');
}
$html = $this->header.$this->content.$this->footer;
//die($html);
$options = new Options();
$options->set('A4','potrait');
$options->set('enable_css_float',true);
$options->set('isHtml5ParserEnabled', true);
$dompdf = new DOMPDF($options);
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream($filename);
}
然后我删除高速缓存/class_index.php
相关问题
- 1. Prestashop:如何用Colorbox替换Fancybox?
- 2. perforce替换库
- 3. 用uClibs库替换glibc库
- 4. ViewPager图库替换
- 5. 替换系统库
- 6. CodeIgniter 3-库替换
- 7. Python netcraft API或替换库
- 8. 替换Wordpress图片库
- 9. 替换Visual Studio标准库
- 10. 替换mysql数据库
- 11. Metro类库,FileInfo替换?
- 12. C++库替换标准cstdio
- 13. 替换远程git仓库
- 14. 替换SQL Server数据库
- 15. Prestashop数据库模式
- 16. ftp访问prestashop数据库
- 17. 的Prestashop数据库异常
- 18. 我如何摆脱..替换(替换(替换(替换(替换(...?
- 19. 用包装库替换库的使用
- 20. 用JAR库替换Android库项目?
- 21. 在PrestaShop后台创建替代订单
- 22. Prestashop库存管理 - 多个仓库
- 23. Haskell正则表达式库替换/替换
- 24. Prestashop如何在一个页面上仅替换一个画廊的左栏
- 25. 如何停止prestashop贝宝模块用原件替换徽标文件?
- 26. 替换/替换记事本
- 27. ajax.actionlink替换vs替换
- 28. Javascript替换不会替换
- 29. 替换Vim中的替换
- 30. 替换替换更新
欢迎来到Stack Overflow!我尽可能地猜测你的问题,然后编辑你的问题。但是,添加代码和说明以便更多知道该主题的人员将看到它。如果需要识别特定问题,请编辑您遇到的特定错误消息。祝你好运! – manetsus