k1low/pdf

pdf: TCPDF and FPDI wrapper

Fund package maintenance!
k1LoW

v2.0.1 2016-11-02 06:48 UTC

This package is auto-updated.

Last update: 2024-12-06 09:56:58 UTC


README

Usage

<?php
use Pdf\Pdf;

$pdf = new Pdf();
$pdf->appendTTFfont('/path/to/ipag.ttf');
    ->read('/path/to/template.pdf')
    ->setValue('あいうえお', ['x' => 10, 'y' => 20])
    ->setValue('6ページ目', ['x' => 10, 'y' => 20, 'page' => 5])
    ->setValue('あいうえお', [
        'x' => 120,
        'y' => 45,
        'width' => 100,
        'height' => 230,
        'fontSize' => 24
    ])
    ->write('/path/to/output.pdf');

License

under MIT License