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

Printing.directPrintPdf is not working for A5 (PdfPageFormat.a5) #1746

Open
5 tasks
Doublelae opened this issue Sep 23, 2024 · 0 comments
Open
5 tasks

Printing.directPrintPdf is not working for A5 (PdfPageFormat.a5) #1746

Doublelae opened this issue Sep 23, 2024 · 0 comments
Labels
bug Something isn't working needs triage

Comments

@Doublelae
Copy link

Describe the bug

To Reproduce
Code snippet to reproduce the behavior:

   bool finish = false;
    try {
      for (int i = 0; i < copies; i++) {
        final data = await Printing.directPrintPdf(
          onLayout: (PdfPageFormat format) async => doc.save(),
          format: pageFormat ?? PdfPageFormat.a5,
          printer: printer,
          usePrinterSettings: true,    // princed A4 
        );
        if (!data) break;
        finish = i == copies - 1 && data;
        endpointsStream.add('printing copy no ---> $i  finished = $finish');
      }
    } catch (e, st) {
      finish = true;
      showCommonSnackBar(
        "Printer Error $e",
        backgroundColor: MyTheme.errorColor,
      );
      endpointsStream.add("print error = $e \n\n $st");
    }

Expected behavior

Screenshots

Flutter Doctor

Desktop (please complete the following information):

  • iOS
  • Android
  • Browser
  • Windows
  • Linux

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

@Doublelae Doublelae added bug Something isn't working needs triage labels Sep 23, 2024
Repository owner deleted a comment Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

1 participant