Closed jamalbtl closed 10 months ago
Same issue https://github.com/Afur/flutter_html_to_pdf/issues/75
Please advise on how to resolve this issue or if there are any updates, patches, or recommendations for a fix. Thank you!
I've sent a fix to this repo from mine but i think this repo is not maintained. You can use my fork of this repository as a workaround.
@raister21 Thanks buddy, you save my life. I have just added the following in html file and it works. .
<style>
@media print {
* {
-webkit-print-color-adjust: exact !important;
}
}
</style>
I am relatively new to Flutter and am currently working with the flutter_html_to_pdf dependency. Everything works fine on Android devices, but I am encountering an issue specifically on iOS devices. The problem is related to CSS rendering, and the styling is not applied correctly when using flutter_html_to_pdf on iOS. Environment: Flutter version: 3.13.6 Xcode version: 15 When attempting to convert HTML to PDF using flutter_html_to_pdf on iOS devices, the CSS styling is not rendered as expected. This issue is observed only on iOS devices, and Android devices are not affected. CONTROLLER
VIEW
Samples are attached. ANDROID RESULT . iOS RESULT . Please advise on how to resolve this issue or if there are any updates, patches, or recommendations for a fix. Thank you!