Skip to content
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

Space between rows not working #143

Open
Sebuahhobi opened this issue Jul 31, 2024 · 0 comments
Open

Space between rows not working #143

Sebuahhobi opened this issue Jul 31, 2024 · 0 comments

Comments

@Sebuahhobi
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant