Skip to content

Space between rows not working #143

@Sebuahhobi

Description

@Sebuahhobi

Space between rows not working

I need nothing space between rows.
I was set spaceBetweenRows = 1, burt not work.

My code:
`
List bytes = [];
final generator = Generator(paper, profile, spaceBetweenRows: 1);
bytes += generator.setGlobalFont(PosFontType.fontB);

  bytes += generator.text('** $namaToko **', styles: const PosStyles(bold: true, align: PosAlign.center));
  bytes += generator.text('${data.dateCreate} ${data.timeCreate}', styles: const PosStyles(align: PosAlign.left));
  bytes += generator.feed(2);
  bytes += generator.text('STRUK PEMBELIAN', styles: const PosStyles(bold: false, align: PosAlign.center));

  bytes += generator.row([
    PosColumn(
      text: 'NO RESI',
      width: 3,
      styles: const PosStyles(
        fontType: PosFontType.fontB,
      ),
    ),
    PosColumn(
      text: ':',
      width: 1,
      styles: const PosStyles(
        fontType: PosFontType.fontB,
      ),
    ),
    PosColumn(
      text: data.transaksiID,
      width: 8,
      styles: const PosStyles(
        fontType: PosFontType.fontB,
      ),
    ),
  ]);
  bytes += generator.row([
    PosColumn(
      text: 'NOMOR TUJUAN',
      width: 3,
      styles: const PosStyles(
        fontType: PosFontType.fontB,
      ),
    ),
    PosColumn(
      text: ':',
      width: 1,
      styles: const PosStyles(
        fontType: PosFontType.fontB,
      ),
    ),
    PosColumn(
      text: data.nomorTujuan,
      width: 8,
      styles: const PosStyles(
        fontType: PosFontType.fontB,
      ),
    ),
  ]);
  bytes += generator.text('NO RESI : ${data.transaksiID}', styles: const PosStyles(bold: false, align: PosAlign.left, fontType: PosFontType.fontB));
  bytes += generator.text('NOMOR TUJUAN : ${data.nomorTujuan}', styles: const PosStyles(bold: false, align: PosAlign.left, fontType: PosFontType.fontB));
  bytes += generator.feed(5);
  return bytes;

`

I saw an example of a drawing that could be tight with no space between the rows. How do you do that?
esc

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