DavBfr / dart_pdf

Pdf creation module for dart/flutter
https://pub.dev/packages/pdf
Apache License 2.0
1.37k stars 599 forks source link

Windows app crashes during print command #1581

Open ArifLiberty opened 6 months ago

ArifLiberty commented 6 months ago

Describe the bug Using Flutter Windows application. After updating the Flutter and printing versions, I no longer can print by Windows app. Flutter version: 2.8.1 -> 3.16.8 Printing version: 5.4.3 -> 5.11.1

when I click on "OK" button in the Print Setup dialog, the application crashes. image

DEBUG CONSOLE is printing as below

Lost connection to device.

Exited.

I also added the following lines in the main windows/CMakeLists.txt file but it does not work

set(PDFIUM_VERSION "4929" CACHE STRING "" FORCE)
set(PDFIUM_ARCH "x64" CACHE STRING "" FORCE)

Desktop (please complete the following information):

AliAlHourash commented 5 months ago

Did you find a solution?

ArifLiberty commented 5 months ago

Did you find a solution?

Not yet

Nay-Thit-Htoo commented 4 months ago

Did you get any solution?

FeofanGreek commented 2 months ago

I have a similar problem. I start printing, while viewing a PDF file (the plugin uses PDF), I try to open another PDF file and get the problem: Lost connection to device.

alex-melnyk commented 3 weeks ago

The same issue I faced, here is the PDFium.dll exception:

Screenshot_2024-07-01_171251

flutter doctor --verbose ```powershell PS C:\Users\askme> flutter doctor --verbose [!] Flutter (Channel stable, 3.19.3, on Microsoft Windows [Version 10.0.22631.3737], locale en-US) • Flutter version 3.19.3 on channel stable at C:\Users\askme\fvm\default ! Warning: `flutter` on your path resolves to C:\Users\askme\fvm\versions\3.19.3\bin\flutter, which is not inside your current Flutter SDK checkout at C:\Users\askme\fvm\default. Consider adding C:\Users\askme\fvm\default\bin to the front of your path. ! Warning: `dart` on your path resolves to C:\Users\askme\fvm\versions\3.19.3\bin\dart, which is not inside your current Flutter SDK checkout at C:\Users\askme\fvm\default. Consider adding C:\Users\askme\fvm\default\bin to the front of your path. • Upstream repository https://github.com/flutter/flutter.git • Framework revision ba39319843 (4 months ago), 2024-03-07 15:22:21 -0600 • Engine revision 2e4ba9c6fb • Dart version 3.3.1 • DevTools version 2.31.1 • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades. [✓] Windows Version (Installed version of Windows is version 10 or higher) [!] Android toolchain - develop for Android devices (Android SDK version 35.0.0) • Android SDK at C:\Users\askme\AppData\Local\Android\sdk • Platform android-35, build-tools 35.0.0 • Java binary at: C:\Users\askme\AppData\Local\Programs\Android Studio\jbr\bin\java • Java version OpenJDK Runtime Environment (build 17.0.10+0--11609105) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses [✓] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.10.3) • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community • Visual Studio Community 2022 version 17.10.35013.160 • Windows 10 SDK version 10.0.22621.0 [✓] Android Studio (version 2024.1) • Android Studio at C:\Users\askme\AppData\Local\Programs\Android Studio • Flutter plugin can be installed from: :hammer: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: :hammer: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.10+0--11609105) [✓] Connected device (2 available) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22631.3737] • Chrome (web) • chrome • web-javascript • Google Chrome 126.0.6478.127 [✓] Network resources • All expected network resources are available. ! Doctor found issues in 2 categories. ```