1. Go to this page and download the library: Download from-home-de/pdf-label library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
from-home-de / pdf-label example snippets
declare(strict_types=1);
use FromHome\Pdf\Label;
$pdf = Label::newFromLabelType(Label::TYPE_L7161);
for($i= 0; $i < $pdf->getLabelsCount(); $i++)
{
$pdf->addLabel('Label text ' . $i);
}
$pdf->save('/path/to/Labels.pdf');
use FromHome\Pdf\Label;
final class MyLabel extends Label
{
public function setUpDocument() : void
{
# setup stuff like default font and font-size here
}
public function Header() : void
{
# Create a custom header here
# See: https://tcpdf.org/examples/example_003/
}
public function Footer() : void
{
# Create a custom footer here
# See: https://tcpdf.org/examples/example_003/
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.