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

What is first bytes for first three commands #407

Open
Rombersoft opened this issue Sep 18, 2022 · 0 comments
Open

What is first bytes for first three commands #407

Rombersoft opened this issue Sep 18, 2022 · 0 comments

Comments

@Rombersoft
Copy link

I don't know TypeScript but I very need to develop print Image on StarTUP 900 printer.
I use .net/C# lang.
There is function from this project:

raster(image: Image, mode: RasterMode = 'NORMAL') {
    if (!(image instanceof Image))
      throw new TypeError('Only escpos.Image supported');
    mode = utils.upperCase(mode);
    if (mode === 'DHDW' ||
      mode === 'DWH' ||
      mode === 'DHW') mode = 'DWDH';
    const raster = image.toRaster();
    const header = _.GSV0_FORMAT[`GSV0_${mode}` as const];
    this.buffer.write(header);
    this.buffer.writeUInt16LE(raster.width);
    this.buffer.writeUInt16LE(raster.height);
    this.buffer.write(raster.data);
    return this;
  };

So, can anybody send me bytes for these three commands:

this.buffer.write(header);
this.buffer.writeUInt16LE(raster.width);
this.buffer.writeUInt16LE(raster.height);

???
In the case when Image has size 384x384 pixels

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