Skip to content

Styling on raster printer (TSP100) #35

@PhiZero

Description

@PhiZero

Hi, I'm having a real hard time figuring out how to apply styling and the documentation regarding this is barely existent.

I have a TSP100 (TSP100IIIBI) and have attempted the following things:

// Attempting emphasis 1
commands.push({'appendEmphasis': "SALE\n"});

// Attempting emphasis 2
commands.push({'enableEmphasis': true});
commands.appendBitmapText(text: 'TEST');
commands.push({'enableEmphasis': true});

// Attempting center
commands.push({'appendAlignment': 'Center', 'data': 'Centered text'});

I have learned that my printer is a raster printer and doesn't support many of the styling commands. How would I be able to work around these issues to at least apply some form of styling? I'm mainly interested in emphasis. I have seen appendBitmapWidget be recommended, but no matter what I do I cannot get any output when using this.

For example:

  commands.appendBitmapWidget(
    widget: Text(
      'TEST',
      style: TextStyle(fontWeight: FontWeight.bold),
    ),
  );

Any help regarding this would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions