Issue
After the bitmap image drawing the next writeln() command does not add a new line after the text.
But the second text is incorrectly placed directly after the first one.
Example of code with issue:
writeln('line1.');
writeln('line2.');
draw(image);
writeln('line3.');
writeln('line4.');
Example causes the output with issue:
line1.
line2.
[Image]
line3.line4.
Root cause
I have found the incorrect ESC command in draw() function after each bitmap line.
File: src/profile/index.ts
Current (incorrect implementation):
yield this.connection.write(Buffer.from('\x1BJ\x00', 'ascii'));
Should be 0x0A only:
yield this.connection.write(Buffer.from('\x0A', 'ascii'));
ESC commands documentation
Testing:
I have tested my offered change. It corrects the issue on my side.
Issue
After the bitmap image drawing the next
writeln()command does not add a new line after the text.But the second text is incorrectly placed directly after the first one.
Example of code with issue:
Example causes the output with issue:
Root cause
I have found the incorrect ESC command in
draw()function after each bitmap line.File: src/profile/index.ts
Current (incorrect implementation):
Should be
0x0Aonly:ESC commands documentation
escposTesting:
I have tested my offered change. It corrects the issue on my side.