承接 nikookherad/pdf 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-11