PHP code example of amattu2 / avery-fpdf-labels

1. Go to this page and download the library: Download amattu2/avery-fpdf-labels 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/ */

    

amattu2 / avery-fpdf-labels example snippets




$template = new amattu2\LabelSheet("Avery5160");
$pdf = new Fpdf\Fpdf();



$template = new amattu2\LabelSheet("Avery5160");
$pdf = new Fpdf\Fpdf();

addTextLabel(array $lines, ?string $align = "C", int $row = null, int $col = null): void

$template->addTextLabel([
  "line 1",
  "line 2",
  "line 3",
  // ...
])

addImageLabel(string $path, int $row = null, int $col = null): void

$template->addImageLabel("https://api.placeholder.app/image/350x350/.png");

addCustomLabel(LabelInterface $label): void