rocketman/pdf-label

此类是 PDF_Label 的修改版本,增加了对 unicode 和 ttf 的支持。

v1.6+rocketman.2 2023-09-10 17:40 UTC

This package is auto-updated.

Last update: 2024-09-10 19:39:14 UTC


README

此类是 PDF_Label 的修改版本,增加了对 unicode 和 ttf 的支持。

上游类的文档和源代码可在此处找到: http://www.fpdf.org/en/script/script29.php

使用 Composer 安装

如果你使用 composer 来管理依赖项,你可以使用

$ composer require rocketman/pdf-label:1.6+rocketman.2

或者,你可以在你的 composer.json 文件中包含以下内容

{
    "require": {
        "rocketman/pdf-label": "^1.6+rocketman.2"
    }
}

用法

$label = "5160"; // pre-defined label name or form-spec array
$pdf = new \PDF_Label($label);
$pdf->AddFont(...); // see tFPDF documentation for AddFont and SetFont
$pdf->SetFont(...);
$pdf->AddPage();
$pdf->Add_Label("label content here");
$pdf->Add_Label("second label");
$pdf->currentLabel("more content for current label");
$pdf->verticalText("vertical text for current label", -1, 0, 'D');
$pdf->writeQRCode("https://www.ibinx.com/", "R");
$pdf->Output();