Skip to content

Commit

Permalink
Add label sheet template 64x34-R
Browse files Browse the repository at this point in the history
* Update changelog
* Bump v1.1.0
  • Loading branch information
hollodotme committed Jun 8, 2021
1 parent c45b34c commit 6aae293
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# CHANGELOG

## [1.1.0] - 2021-06-08

* Add label format template "64x34-R" (3x8 lables per sheet)

## [1.0.0] - 2021-06-02

First stable release.

[1.1.0]: https://github.com/from-home-de/pdf-label/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/from-home-de/pdf-label/tree/v1.0.0
15 changes: 15 additions & 0 deletions src/Label.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ class Label extends TCPDF

public const TYPE_NEW_PRINT_4005 = 'NewPrint4005';

public const TYPE_64x34_R = '64x34-R';

public const TYPE_90x54 = '90x54';

public const TYPE_138x98 = '138x98';
Expand Down Expand Up @@ -208,6 +210,19 @@ class Label extends TCPDF
'height' => 46.6,
'cutLines' => false,
],
self::TYPE_64x34_R => [
'paper-size' => 'A4',
'unit' => self::UNIT_MILLIMETER,
'marginLeft' => 9.4,
'marginTop' => 13.1,
'NX' => 3,
'NY' => 8,
'SpaceX' => 2.5,
'SpaceY' => 0,
'width' => 63.5,
'height' => 33.9,
'cutLines' => false,
],
self::TYPE_90x54 => [
'paper-size' => 'A4',
'unit' => self::UNIT_MILLIMETER,
Expand Down
4 changes: 4 additions & 0 deletions tests/Unit/LabelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ public function labelTypesProvider() : array
'labelType' => Label::TYPE_NEW_PRINT_4005,
'expectedLabelCount' => 8,
],
[
'labelType' => Label::TYPE_64x34_R,
'expectedLabelCount' => 24,
],
[
'labelType' => Label::TYPE_90x54,
'expectedLabelCount' => 10,
Expand Down

0 comments on commit 6aae293

Please sign in to comment.