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

setPrintWidth not working as expected #6

Open
dnyanesh2700 opened this issue Nov 10, 2021 · 2 comments
Open

setPrintWidth not working as expected #6

dnyanesh2700 opened this issue Nov 10, 2021 · 2 comments

Comments

@dnyanesh2700
Copy link

var escpos = Neodynamic.JSESCPOSBuilder;
var doc = new escpos.Document();
var new_doc = new escpos.Document();
var header = doc

                                                            .align(escpos.TextAlignment.Center)
                                                             . setPrintWidth(48)          
                                                            .image(logo, escpos.BitmapDensity.D24)
                                                            .font(escpos.FontFamily.A)
                                                            .style([escpos.FontStyle.Bold])
                                                            .size(0, 1)
                                                         
                                                            .font(escpos.FontFamily.A)
                                                            .style([escpos.FontStyle.Bold])
                                                            .size(0, 0.5)
                                                            .newLine()
                                                            .cut(partial_feed,partial_cut)
                                                            .generateUInt8Array();
                                                            cpj.binaryPrinterCommands = header;
                                                            cpj.sendToClient();

When I am trying to set width from Script it is getting print as:

image_1

when I am chang width in lib file of JSESCPOSBuilder.js at line 244 it work correctly, but from script not working correctly.

@1TCP5
Copy link

1TCP5 commented Dec 31, 2022

same issue

@nicolaslopezj
Copy link

You can set the width doing this:

let instructions = new Document()
instructions.width = 42

It works correctly

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

3 participants