Closed Tejas20002 closed 4 days ago
Ahh that was the viewer problem, I have been manipulating my pdf files. π₯π₯
Hi @Tejas20002, We are unable to replicate the reported issue, and the font color of the page text is not changed as reported. Please find the screenshots below,
Windows,
Web,
macOS,
Could you please share the following information to analyze more on this issue?
When previewing the PDF with a native app, it displays correctly. However, when opening the same PDF with a plugin, the colors are altered. The PDF is password-protected with the following password: cN}6DmRsb}h2(*s@nAYeu-MIUjBU_48xj9Y5TnwjtPtPeRkoO)
Here is the PDF file: 1.pdf @immankumarsync
syncfusion_flutter_pdfviewer package version: 26.1.42 Platform in which the application is deployed: Windows, MacOS, Linux
@Tejas20002, we are able to replicate the reported issue. Currently, we are validating the issue, and we will update further details once the validation is completed.
However, we are unable to understand the phrase "when opening the same PDF with a plugin." Could you please explain this? Also, the syncfusion_flutter_pdfviewer is not supported on the Linux platform. Could you please explain how you are deploying the app on the Linux platform? Do you build the application for the web and deploy it on a URL?
@immankumarsync Apologies for the confusion. When I mentioned the plugin, I meant syncfusion_flutter_pdfviewer. We currently don't have a web application; we only work on Windows and MacOS. And by Linux, I meant AndroidβI totally forgot about that.
I'm really very sorry about the mistake.
@immankumarsync were you able to replicate the issue and do see any updates for the same? Thank a lot.
The fix for the reported issue "Text color changes when decrypting a specific PDF document" has been included in our weekly release v26.2.7.
Package link: syncfusion_flutter_pdfviewer v26.2.7
Root Cause: When removing the password from an encrypted PDF document, we decrypt all the encrypted content embedded within it. In this case, while decrypting the color space in the document, the lookup parameter, which provides the mapping between index values and the corresponding colors in the base color space, was not properly decrypted and encoded. This caused improper color preservation in the PDF document.
@immankumarsync awesome, Let me check!
@immankumarsync Thank you, it seems to be working well for us. We can mark this to Resolved
Bug description
Hey, we're encountering an issue with previewing some PDFs in our Flutter application. The font colors in certain PDFs are changing unexpectedly. This problem doesn't occur with all PDFs, just with some specific ones. We're not sure why this is happening. Could you please look into this and let us know what's going on?
Steps to reproduce
none
Code sample
Code sample
```dart body: SfPdfViewer.file( widget.pdfFile, controller: _pdfViewerController, key: _pdfViewerKey, enableTextSelection: false, interactionMode: PdfInteractionMode.pan, scrollDirection: PdfScrollDirection.vertical, canShowPasswordDialog: false, password: widget.password, pageLayoutMode: PdfPageLayoutMode.single, enableDoubleTapZooming: true, maxZoomLevel: 5, ), ```Screenshots or Video
Screenshots / Video demonstration
Application preview image ![WhatsApp Image 2024-07-12 at 04 10 00](https://github.com/user-attachments/assets/126ce63e-b4fe-4619-a705-cb18f3fe7af7) Original pdf image ![WhatsApp Image 2024-07-12 at 04 12 11](https://github.com/user-attachments/assets/c4b1fadf-89ac-4d89-8df9-2af885545d0c) Original pdf [Math-All-test-7.pdf](https://github.com/user-attachments/files/16261737/Math-All-test-7.pdf)Stack Traces
Stack Traces
No error foundOn which target platforms have you observed this bug?
Windows, MacOS, Linux
Flutter Doctor output
Doctor output
```console at 15:06:27 π β flutter doctor -v [!] Flutter (Channel stable, 3.22.2, on macOS 14.5 23F79 darwin-arm64, locale en-US) β’ Flutter version 3.22.2 on channel stable at /opt/homebrew/Caskroom/flutter/3.19.5/flutter ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/3.4.4/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /opt/homebrew/Caskroom/flutter/3.19.5/flutter. Consider adding /opt/homebrew/Caskroom/flutter/3.19.5/flutter/bin to the front of your path. β’ Upstream repository https://github.com/flutter/flutter.git β’ Framework revision 761747bfc5 (6 weeks ago), 2024-06-05 22:15:13 +0200 β’ Engine revision edd8546116 β’ Dart version 3.4.3 β’ DevTools version 2.34.3 β’ If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades. [β] Android toolchain - develop for Android devices (Android SDK version 34.0.0) β’ Android SDK at /Users/macos/Library/Android/sdk β’ Platform android-34, build-tools 34.0.0 β’ Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java β’ Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160) β’ All Android licenses accepted. [!] Xcode - develop for iOS and macOS (Xcode 15.4) β’ Xcode at /Applications/Xcode.app/Contents/Developer β’ Build 15F31d β Unable to get list of installed Simulator runtimes. β’ CocoaPods version 1.15.2 [β] Chrome - develop for the web β’ Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [β] Android Studio (version 2023.3) β’ Android Studio at /Applications/Android Studio.app/Contents β’ Flutter plugin can be installed from: π¨ https://plugins.jetbrains.com/plugin/9212-flutter β’ Dart plugin can be installed from: π¨ https://plugins.jetbrains.com/plugin/6351-dart β’ Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160) [β] VS Code (version 1.91.0) β’ VS Code at /Applications/Visual Studio Code.app/Contents β’ Flutter extension can be installed from: π¨ https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter [β] Connected device (3 available) β’ macOS (desktop) β’ macos β’ darwin-arm64 β’ macOS 14.5 23F79 darwin-arm64 β’ Mac Designed for iPad (desktop) β’ mac-designed-for-ipad β’ darwin β’ macOS 14.5 23F79 darwin-arm64 β’ 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. ```