-
Notifications
You must be signed in to change notification settings - Fork 78
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
Still Getting Small #46
Comments
I am facing the same issue. |
Hello, I have the same issue with Samsung Note 9. Thanks Author, it's an amazing print library! |
same issue on android, with a blackview phone |
hacked it by passing paperSize: PaperSize.mm80 for 50mm |
How can you set the paperSize: PaperSize.mm80 @flutter-painter ? |
@marcosjsfraga the method printReceiptText takes optionnal param paperSize : if (Platform.isAndroid) {
_bluePrintPos.printReceiptText(
_receiptText,
paperSize: PaperSize.mm80,
);
} |
@flutter-painter I tried something like yours but when I add PaperSize.mm80 , there is an error message , undefined name PaperSize |
Sorry, i forget to add |
@Subarkah7 ill try that |
@nasibudesign @marcosjsfraga @KimGiay @marcosjsfraga @Subarkah7 @nasibudesign Please use this patch: In file |
Ive tried your code and its is printing fine, for image, Qr code, but when it comes to text the size of the text is smaller regarless the PaperSize.mm.XX used.
Printer used are POS models:
when using provided sdk or package like (blue_thermal_printer: ^1.2.0) text prints fine,
Ive tested all the paper size but no sucess
here the full code to replicate
`
import 'package:blue_print_pos/blue_print_pos.dart';
Future _onScanPressed() async {
setState(() => _isLoading = true);
_bluePrintPos.scan().then((List devices) {
if (devices.isNotEmpty) {
setState(() {
_blueDevices = devices;
_isLoading = false;
});
} else {
setState(() => _isLoading = false);
}
});
}
void _onDisconnectDevice() {
_bluePrintPos.disconnect().then((ConnectionStatus status) {
if (status == ConnectionStatus.disconnect) {
setState(() {
_selectedDevice = null;
});
}
});
}
void _onSelectDevice(int index) {
setState(() {
_isLoading = true;
_loadingAtIndex = index;
});
final BlueDevice blueDevice = _blueDevices[index];
_bluePrintPos.connect(blueDevice).then((ConnectionStatus status) {
if (status == ConnectionStatus.connected) {
setState(() => _selectedDevice = blueDevice);
} else if (status == ConnectionStatus.timeout) {
_onDisconnectDevice();
} else {
print('$runtimeType - something wrong');
}
setState(() => _isLoading = false);
});
}
Future _onPrintReceipt() async {
/// Example for Print Image
final ByteData logoBytes = await rootBundle.load(
'assets/logo.jpg',
);
await _bluePrintPos.printReceiptImage(logoBytes.buffer.asUint8List());
The text was updated successfully, but these errors were encountered: