Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
E
esc_pos_print_plus
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dio Maulana
esc_pos_print_plus
Commits
2f4e2787
Commit
2f4e2787
authored
Jun 19, 2019
by
Andrey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Turn 90° clockwise rotation mode on/off
parent
ace22e5c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
5 deletions
+8
-5
README.md
README.md
+2
-2
commands.dart
lib/src/commands.dart
+3
-3
pos_styles.dart
lib/src/pos_styles.dart
+2
-0
printer.dart
lib/src/printer.dart
+1
-0
No files found.
README.md
View file @
2f4e2787
...
@@ -81,8 +81,8 @@ printer.printRow([
...
@@ -81,8 +81,8 @@ printer.printRow([
*
Print images
*
Print images
*
Print barcodes
*
Print barcodes
*
Print QR codes
*
Print QR codes
*
Turn 90° clockwise rotation mode on/off
*
~~Turn 90° clockwise rotation mode on/off~~
*
Flutter example: print a demo receipt
*
Flutter example: print a demo receipt
*
Flutter example: discover active Wi-Fi printers
*
~~Flutter example: discover active Wi-Fi printers~~
*
USB, Bluetooth printers support
*
USB, Bluetooth printers support
*
*Add encoding commands*
*
*Add encoding commands*
\ No newline at end of file
lib/src/commands.dart
View file @
2f4e2787
...
@@ -29,6 +29,9 @@ const cBoldOn = '${esc}E1'; // Turn emphasized mode on
...
@@ -29,6 +29,9 @@ const cBoldOn = '${esc}E1'; // Turn emphasized mode on
const
cBoldOff
=
'
${esc}
E0'
;
// Turn emphasized mode off
const
cBoldOff
=
'
${esc}
E0'
;
// Turn emphasized mode off
const
cFontA
=
'
${esc}
M0'
;
// Font A
const
cFontA
=
'
${esc}
M0'
;
// Font A
const
cFontB
=
'
${esc}
M1'
;
// Font B
const
cFontB
=
'
${esc}
M1'
;
// Font B
const
cTurn90On
=
'
${esc}
V1'
;
// Turn 90° clockwise rotation mode on
const
cTurn90Off
=
'
${esc}
V0'
;
// Turn 90° clockwise rotation mode off
const
cCodeTable
=
'
${esc}
t'
;
// Select character code table [N]
// Print Position
// Print Position
const
cAlignLeft
=
'
${esc}
a0'
;
// Left justification
const
cAlignLeft
=
'
${esc}
a0'
;
// Left justification
...
@@ -39,6 +42,3 @@ const cPos = '$esc\$'; // Set absolute print position [nL] [nH]
...
@@ -39,6 +42,3 @@ const cPos = '$esc\$'; // Set absolute print position [nL] [nH]
// Print
// Print
const
cFeedN
=
'
${esc}
d'
;
// Print and feed n lines [N]
const
cFeedN
=
'
${esc}
d'
;
// Print and feed n lines [N]
const
cReverseFeedN
=
'
${esc}
e'
;
// Print and reverse feed n lines [N]
const
cReverseFeedN
=
'
${esc}
e'
;
// Print and reverse feed n lines [N]
// Code table
const
cCodeTable
=
'
${esc}
t'
;
// Select character code table [N]
\ No newline at end of file
lib/src/pos_styles.dart
View file @
2f4e2787
...
@@ -14,6 +14,7 @@ class PosStyles {
...
@@ -14,6 +14,7 @@ class PosStyles {
this
.
bold
=
false
,
this
.
bold
=
false
,
this
.
reverse
=
false
,
this
.
reverse
=
false
,
this
.
underline
=
false
,
this
.
underline
=
false
,
this
.
turn90
=
false
,
this
.
align
=
PosTextAlign
.
left
,
this
.
align
=
PosTextAlign
.
left
,
this
.
height
=
PosTextSize
.
size1
,
this
.
height
=
PosTextSize
.
size1
,
this
.
width
=
PosTextSize
.
size1
,
this
.
width
=
PosTextSize
.
size1
,
...
@@ -23,6 +24,7 @@ class PosStyles {
...
@@ -23,6 +24,7 @@ class PosStyles {
final
bool
bold
;
final
bool
bold
;
final
bool
reverse
;
final
bool
reverse
;
final
bool
underline
;
final
bool
underline
;
final
bool
turn90
;
final
PosTextAlign
align
;
final
PosTextAlign
align
;
final
PosTextSize
height
;
final
PosTextSize
height
;
final
PosTextSize
width
;
final
PosTextSize
width
;
...
...
lib/src/printer.dart
View file @
2f4e2787
...
@@ -66,6 +66,7 @@ class Printer {
...
@@ -66,6 +66,7 @@ class Printer {
// print('dec: $pos \t hex: $hexStr \t pair $hexPair');
// print('dec: $pos \t hex: $hexStr \t pair $hexPair');
_socket
.
write
(
styles
.
bold
?
cBoldOn
:
cBoldOff
);
_socket
.
write
(
styles
.
bold
?
cBoldOn
:
cBoldOff
);
_socket
.
write
(
styles
.
turn90
?
cTurn90On
:
cTurn90Off
);
_socket
.
write
(
styles
.
reverse
?
cReverseOn
:
cReverseOff
);
_socket
.
write
(
styles
.
reverse
?
cReverseOn
:
cReverseOff
);
_socket
.
write
(
styles
.
underline
?
cUnderline1dot
:
cUnderlineOff
);
_socket
.
write
(
styles
.
underline
?
cUnderline1dot
:
cUnderlineOff
);
_socket
.
write
(
styles
.
align
==
PosTextAlign
.
left
_socket
.
write
(
styles
.
align
==
PosTextAlign
.
left
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment