Skip to content

Not able to align image in center of thermal paper bluetooth_print 4.3.0 #195

@krunalagrawal

Description

@krunalagrawal

Hello,

I want to display an image in center of page, but not getting it displayed on center.
Kindly provide if someone got this working.
Thanks in advance.

Below is my code snippet.

void printOrder(queryParameters) async {
Map<String, dynamic> config = {};
List list = [];
list.add(LineText(type: LineText.TYPE_IMAGE, content: base64Image, align: LineText.ALIGN_CENTER, width: 200, height: 100, linefeed: 1));
list.add(LineText(linefeed: 1));
list.add(LineText(type: LineText.TYPE_TEXT, content: 'Token No.${tokenNo.text}', weight: 1, align: LineText.ALIGN_CENTER, linefeed: 1));
list.add(LineText(linefeed: 1));
list.add(LineText(type: LineText.TYPE_TEXT, content: 'Name: ${accountName.text} ${dateInput.text} ${queryParameters['orderTime']}', weight: 1, align: LineText.ALIGN_LEFT, linefeed: 1));
list.add(LineText(type: LineText.TYPE_TEXT, content: '--------------------------------', align: LineText.ALIGN_LEFT, linefeed: 1));
list.add(LineText(type: LineText.TYPE_TEXT, content: 'Item Qty Rate Amt', weight: 1, align: LineText.ALIGN_LEFT, linefeed: 1));
list.add(LineText(type: LineText.TYPE_TEXT, content: '--------------------------------', align: LineText.ALIGN_LEFT, linefeed: 1));
await bluetoothPrint.printReceipt(config, list);
}

WhatsApp Image 2024-05-25 at 7 02 30 PM

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions