Skip to content

[BUG] Extra white space on right side for 77mm print; print fails for other paper sizes #142

Description

@amrutakawale

When printing using electron-pos-printer on a Star TSP100 printer:

  1. For 77mm paper, the print output shows extra white space on the right side, even when using textAlign: "center".
  2. When changing pageSize to other sizes (e.g., 80mm), the printer does not print at all.

Steps to Reproduce:
const { PosPrinter } = require("electron-pos-printer");

const options = {
preview: false,
margin: "0 0 0 0",
copies: 1,
printerName: "Your_Star_TSP100_Printer_Name",
timeOutPerLine: 5000,
silent: true,
pageSize: "77mm",
};

const data = [
{
type: "text",
value: "Test Print",
style: { textAlign: "center" },
},
];

PosPrinter.print(data, options);

Expected Behaviour:

Text should be centred without extra white space.
Should print correctly for all supported paper sizes.

Actual Behaviour:

For 77mm paper, the right side has extra white space.
For other sizes, nothing is printed.

Environment:

electron-pos-printer version: [1.3.8]
Electron: "electron": "^36.2.0",
OS: [Windows]
Printer: Star TSP100

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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