-
Notifications
You must be signed in to change notification settings - Fork 44
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
How write line with justification on the same line ? #43
Comments
You cannot do that. You can only justify the same line with one property: left, right or middle, but will apply for all the line. To do what you want, you must "build" you line with spaces in the right places, and know the width of the paper. Example: for a printer with 48 cols
|
That's works. Thanks |
Another little hitch, do you have a solution for products with long product names? I have customers who have products with long names (i.e. lots of characters) and this shifts the price. Does anyone have a tip? |
There is not, exactly, a "solution" for this kind of problem. If the name is too long... it's too long. You can "short" it to a fixed length to avoid shifting. |
Hello,
How write a line with justification on the left (ex. quantity, product title) and on the same line but with a justification on the right the price ?
When i use setjustification & writeline that's alaways make a break line.
Ex
this.ticket.forEach((product) => { print .setJustification('left').writeLine(
${product.quantity}x ${product.title}).setJustification('right').writeLine(
${product.price}); });
The text was updated successfully, but these errors were encountered: