Skip to content

Space between rows not working #143

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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