robgridley/pdflib 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

robgridley/pdflib

Composer 安装命令:

composer require robgridley/pdflib

包简介

PDFlib made usable.

README 文档

README

I use this PDFlib wrapper in my own projects. It is feature incomplete and provided as-is. Updates are irregular and they may break the API. Great sales pitch, eh?

Example

This example creates a new PDF, places a page from an existing PDF, uses PDFlib PPS to fill a text block, and draws a red circle.

use Pdf\Color\CmykColor;
use Pdf\Drawing;
use Pdf\PdfBuilder;

$pdf = new PdfBuilder;

$document = $pdf->import(file_get_contents('test.pdf'));
$page = $document->page(1, ['cloneBoxes']);

$pdf->addPage();
$pdf->placePage($page, 0, 0, ['cloneBoxes']);

$page->block('address')->fill('123 Fake St., Toronto, ON  M1A 1A1');

$pdf->draw(function (Drawing $drawing) {
    $drawing->stroke(new CmykColor(0, 100, 100, 0), 0.25)->circle(100, 100, 50)->paintStroke();
});

echo $pdf->render();

统计信息

  • 总下载量: 1.79k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 3
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-01-27