Skip to content
This repository has been archived by the owner on Dec 15, 2019. It is now read-only.

mreg-archive/pdflabels

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF Labels

Render pdfs using a grid of labels

Usage

$labels = \pdflabels\LabelsFactory::createStd();

// Grab content
$content = array(
    array(
        "FOO BAR",
        "BARSTREET 87",
        "111 11 TOWN"
    ),
    array(
        "BAR FOO",
        "FOOSTREET 7",
        "222 22 TOWN"
    ),
    array(
        "FOOBAR",
        "FOOBARSTREET 31",
        "111 11 TOWN"
    )
);

// Add some cells
foreach ($content as $cell) {
    $labels->addCell(implode("\n", $cell));
}

// Generate pdf
echo $labels->getPdf();

Testing

To run the tests you must first install the dependencies using composer.

$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install
$ phpunit

@author Hannes Forsgård (hannes.forsgard@fripost.org)

About

Render pdfs using a grid of labels

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages