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

any chance of adding ESC/POS support? #14

Open
Alii-isk opened this issue Jan 26, 2024 · 2 comments
Open

any chance of adding ESC/POS support? #14

Alii-isk opened this issue Jan 26, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Alii-isk
Copy link

i am building a POS system and i want to print the receipt using Thermal printer 80mm

but i see that this plugin only support the following paper size:
"A4" | "A2" | "A3" | "A4" | "A5" | "A6" | "letter" | "legal" | "tabloid"

@Alii-isk Alii-isk changed the title any change of adding ESC/POS support? any chance of adding ESC/POS support? Jan 26, 2024
@alfianlensundev
Copy link
Owner

i am building a POS system and i want to print the receipt using Thermal printer 80mm

but i see that this plugin only support the following paper size: "A4" | "A2" | "A3" | "A4" | "A5" | "A6" | "letter" | "legal" | "tabloid"

can you try this ?

await print(data, {
preview: false,
print_setting: {
orientation: "portrait",
paper: "A4",
scale: "shrink"
}
})

For now, this library is indeed designed for 80mm paper; other paper sizes are still under development

@alfianlensundev alfianlensundev added the enhancement New feature or request label Jan 26, 2024
@alfianlensundev alfianlensundev self-assigned this Jan 26, 2024
@bright-coder
Copy link

bright-coder commented Jan 29, 2024

nothing happen. i set my esc/pos to default printer.

  // print pdf file
  await print(data, {
    remove_temp: true,
    preview: false, // Set to true if you want to display the preview
    // page_size: {
    //   width: 300, // unit px
    //   heigth: 400, // unit px
    // },
    print_setting: {
      orientation: "portrait", // portrait | landscape
      //method: "simplex", // duplex | simplex | duplexshort
      paper: "A4", // "A2" | "A3" | "A4" | "A5" | "A6" | "letter" | "legal" | "tabloid"
      scale: "shrink", //"noscale" | "shrink" | "fit"
      //repeat: 1, // total copies,
      // range: "1,2,3"    // print page 1,2,3
      // range: {
      //   // print page 1 - 3
      //   from: 1,
      //   to: 3,
      // },
    },
  });
`

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

No branches or pull requests

3 participants