Giter Club home page Giter Club logo

Comments (8)

FriedrichFroebel avatar FriedrichFroebel commented on May 27, 2024

This does not seem to be supported without further changes as both command sets handled here are supported by your model:

try:
if cut:
qlr.add_autocut(True)
qlr.add_cut_every(1)
except BrotherQLUnsupportedCmd:
pass
try:
qlr.dpi_600 = dpi_600
qlr.cut_at_end = cut
qlr.two_color_printing = True if red else False
qlr.add_expanded_mode()
except BrotherQLUnsupportedCmd:
pass
You might try to use

convert(qlr, images, **kwargs)
qlr.cut_at_end = True
qlr.add_expanded_mode()
instructions = qlr.data

but I have not tested it and this probably will not actually work.

from brother_ql.

stuartlynne avatar stuartlynne commented on May 27, 2024

from brother_ql.

FriedrichFroebel avatar FriedrichFroebel commented on May 27, 2024

Then you might want to create your custom raster class:

class CutAtEndRaster(BrotherQLRaster):
    def add_expanded_mode(self):
        self.cut_at_end = True
        return super().add_expanded_mode()


qlr = CutAtEndRaster(model)
instructions = convert(qlr, images, **kwargs)
send(instructions=instructions, printer_identifier=printer, backend_identifier=backend, blocking=True)

from brother_ql.

stuartlynne avatar stuartlynne commented on May 27, 2024

from brother_ql.

FriedrichFroebel avatar FriedrichFroebel commented on May 27, 2024

Did you set cut=False for this? Then you are only left with doing the same as in my previous comment with add_cut_every(n) and setting n to the number of pages you have while enabling cut=True as far as I understand.

from brother_ql.

stuartlynne avatar stuartlynne commented on May 27, 2024

from brother_ql.

FriedrichFroebel avatar FriedrichFroebel commented on May 27, 2024
convert(qlr, images, **kwargs)
qlr.add_cut_every(2)

is wrong. You need a custom BrotherQLRaster class which overrides add_cut_every with your custom logic and cut=True set, as convert does not allow you to pass these parameters directly.

from brother_ql.

stuartlynne avatar stuartlynne commented on May 27, 2024

from brother_ql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.