PHP code example of figuren-theater / label-printing
1. Go to this page and download the library: Download figuren-theater/label-printing 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/ */
figuren-theater / label-printing example snippets
/**
* Add your own labels or adjust the defaults using this filter.
*
* @hook Figuren_Theater\Label_Printing\Patterns\bootstrap_labels
* @since 0.2.0
*
* @param {array} $default_labels List of Labels (an array of arrays) that will be inserted into the DB on import by default.
*
* @return {array} List of Labels (an array of arrays) that will be inserted into the DB on import.
*/
\add_filter(
'Figuren_Theater\Label_Printing\Patterns\bootstrap_labels',
function( array $default_labels ) : array {
return [
[
'name' => 'A6 Landscape (4 Labels per A4)',
'width' => 148, // in mm
'height' => 105, // in mm
'a4_border_tb' => 0, // in mm
'a4_border_lr' => 0, // in mm
'orientation' => 'landscape',
],
[
'name' => 'Minis (64 Labels per A4)',
'width' => 48, // in mm
'height' => 17, // in mm
'a4_border_tb' => 13, // in mm
'a4_border_lr' => 8, // in mm
'orientation' => 'portrait',
],
];
}
);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.