Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to disable automatic line feeds after image printing #43

Open
spaansba opened this issue Nov 27, 2024 · 0 comments
Open

Option to disable automatic line feeds after image printing #43

spaansba opened this issue Nov 27, 2024 · 0 comments

Comments

@spaansba
Copy link

spaansba commented Nov 27, 2024

I am trying to print images to my printer but I am suspecting the PrinterEncoder is adding extra line feeds after inserting an Image in column mode. Is this the case, and if so is there an option to turn it off?

  const encoder = new ReceiptPrinterEncoder({
    printerModel: "pos-8360",
    columns: 32,
    newLine: "\n",
    imageMode: "column",
    font: "9x17",
  })

  const result = encoder
          .initialize()
          .raw([0x1b, 0x40])
          .font("a")
          .align("center")
          .size(1)
          .image(logoImageData, 376, 96, "atkinson", 128)
          .rule()
          .image(profileImageData, 376, roundTo8(profileSize + 16), "atkinson", 128)
          .align("left")
          .rule()
          .encode()

Result (see below) as you can see there is a pretty big white space between the images and the next rule

IMG_0361

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant