snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Add Label Template: Use with endless 62mm Brother printer rolls

Open Galaxy102 opened this issue 8 months ago • 6 comments

Description

I've added a label template for usage with endless Brother 62 mm label rolls (e.g. DK22212). Because the label is printed with non-standard print flow (top-down instead of left-to-right), I've added a overridable function Label#getRotation() which can control TCPDFs Rotate format constructor argument (see https://stackoverflow.com/a/65296951/5885325). The default return value of this function is 0 in order to not break existing labels.

Here is a sample: image 100001.pdf

There is no associated issue. There are no changed dependencies. This PR can be cherry-picked to develop directly.

Disclaimer: This PR is raised on behalf of Peerox GmbH, the company I work for.

Type of change

  • [x] New feature (non-breaking change which adds functionality)

How Has This Been Tested?

I've tested this by generating a label using the Web UI via docker compose on Manjaro with Chromium 124.

The printer label format was created using sudo brpapertoollpr_ql600 -P Brother_QL-600 -n SnipeIT-62mmL -w 62 -h 37.

It is then printable via Print using system dialog -> Orientation = Landscape, Paper size = SnipeIT-62mmL.

Here is a picture of the result: label

Checklist:

  • [x] I have read the Contributing documentation available here: https://snipe-it.readme.io/docs/contributing-overview
  • [x] I have formatted this PR according to the project guidelines: https://snipe-it.readme.io/docs/contributing-overview#pull-request-guidelines
  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation -> there is very few documentation on labels
  • [x] My changes generate no new warnings
  • [ ] I have added tests that prove my fix is effective or that my feature works -> there are no tests for labels
  • [ ] New and existing unit tests pass locally with my changes -> there are no tests for labels

Galaxy102 avatar Jun 13 '24 16:06 Galaxy102