You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Re-testing a custom action in FlutterFlow that generates a PDF using the packages pdf and printing packages, I realize that the PDF gets generated but I cannot view it on my iOS devices. The custom action also stores the PDF in Google storage and that file can be viewed, so I'm certain that the PDF got properly generated. This has worked perfectly a few weeks ago and now no longer does, so must be an incompatibility with either an iOS change or a Flutter or new package version incompatibility. Note that the PDF still opens in Android, so it does not look like it's a generic Flutter (or FlutterFlow) issue. Versions used: pdf: ^3.10.7, printing: ^5.11.1 (5.12.0 makes no difference).
The error thrown in iOS produces a few lines in the Xcode console:
[ERROR:flutter/shell/common/shell.cc(1038)] The 'net.nfet.printing' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.
Expected behavior
Upon invoking the Printing.layout method (see code above), the iOS (or Android) print dialog appears. At this point the user can choose to print or cancel or whatever the PDF document. A thumbnail of the document should be visible within the dialog box but it is missing in iOS (while still present in Android). Selecting Print in iOS does not print the PDF.
To Reproduce
Code snippet to reproduce the behavior: final Uint8List pdfData = await report.buildPdf(PdfPageFormat.letter); await Printing.layoutPdf(onLayout: (PdfPageFormat format) async => pdfData);
Screenshots
Flutter Doctor
andreaswerder@Andreass-M3-MacBook-Pro a_p_test_app % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.4, on macOS 14.4.1 23E224 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.87.2)
[✓] Connected device (4 available)
[✓] Network resources
• No issues found!
Desktop (please complete the following information):
Browser (Chrome on Mac OS14.4.1)
Smartphone (please complete the following information):
Device: [e.g. iPhone13, iPad mini 4]
OS: [e.g. iOS 17.4.1 / iPad OS 15.8.1]
Additional context
The text was updated successfully, but these errors were encountered:
Describe the bug
Re-testing a custom action in FlutterFlow that generates a PDF using the packages pdf and printing packages, I realize that the PDF gets generated but I cannot view it on my iOS devices. The custom action also stores the PDF in Google storage and that file can be viewed, so I'm certain that the PDF got properly generated. This has worked perfectly a few weeks ago and now no longer does, so must be an incompatibility with either an iOS change or a Flutter or new package version incompatibility. Note that the PDF still opens in Android, so it does not look like it's a generic Flutter (or FlutterFlow) issue. Versions used: pdf: ^3.10.7, printing: ^5.11.1 (5.12.0 makes no difference).
The error thrown in iOS produces a few lines in the Xcode console:
[ERROR:flutter/shell/common/shell.cc(1038)] The 'net.nfet.printing' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.
Expected behavior
Upon invoking the Printing.layout method (see code above), the iOS (or Android) print dialog appears. At this point the user can choose to print or cancel or whatever the PDF document. A thumbnail of the document should be visible within the dialog box but it is missing in iOS (while still present in Android). Selecting Print in iOS does not print the PDF.
To Reproduce
Code snippet to reproduce the behavior:
final Uint8List pdfData = await report.buildPdf(PdfPageFormat.letter); await Printing.layoutPdf(onLayout: (PdfPageFormat format) async => pdfData);
Screenshots
Flutter Doctor
andreaswerder@Andreass-M3-MacBook-Pro a_p_test_app % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.4, on macOS 14.4.1 23E224 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.87.2)
[✓] Connected device (4 available)
[✓] Network resources
• No issues found!
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: