3dgoo/silverstripe-dompdf
最新稳定版本:1.0.0
Composer 安装命令:
composer require 3dgoo/silverstripe-dompdf
包简介
Silverstripe PDF Generation via DOMPDF Library
README 文档
README
This module provides PDF generation through the dompdf library for Silverstripe 3.
This is a fork of:
Input:
- HTML string (which could be a rendered template)
- HTML File
Output
- PDF file location
- SS file
- PDF binary stream to browser
Installation (with composer)
$ composer require 3dgoo/silverstripe-dompdf
Example usage
$pdf = new SS_DOMPDF(); $pdf->setHTML($mydataobject->renderWith('MyTemplate')); $pdf->render(); $pdf->toFile('mypdf.pdf');
Debugging
The $pdf->streamdebug(); function is useful for quickly viewing pdfs, particularly if your browser supports displaying pdfs, rather than downloading.
You can check your html before it is converted like this:
echo $mydataobject->renderWith('MyTemplate'); die();
Useful Tips
- Use tables for layout if you get errors from floating divs.
- See the official dompdf website for more info
统计信息
- 总下载量: 20
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2023-03-19