nikookherad/pdf
Composer 安装命令:
composer require nikookherad/pdf
包简介
for create pdf file from html
关键字:
README 文档
README
This service use for convert html to pdf
This service needs athena pdf service(https://github.com/arachnys/athenapdf)
For initialize this service make sure you set environment's variables
PDF_SERVICE_URL=172.19.0.5:8080 PDF_SERVICE_AUTH=arachnys-weaver
this service has three methods
- set html method:
$html=view("athenaTemplate.test.index"); PDF\PDF::setHtml($html);
- render method:
$html=view("athenaTemplate.test.index"); return response()->make(PDF\PDF:: setHtml($html) ->render(),200, [ 'content-type' => 'application/pdf' ]);
- download method:
$html=view("athenaTemplate.test.index"); $pdfName="test"; PDF\PDF::setHtml($html) ->download(public_path(sprintf( 'temp/%s.pdf', $pdfName )));
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-10-11