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
Hello @DavBfr,
First of all, thank you for taking the time to develop this flutter library which is very useful.
I occasionally encounter crashes in production due to memory problems when previewing PDFs. I generate photo books, so some PDFs can contain more than 50 pages with lots of photos.
To Reproduce
Difficult to reproduce because it depends of the free memory in device
Expected behavior
Be able to generate the rasterization of the pdf without error
Desktop (please complete the following information):
iOS
[ X] Android
Browser
Windows
Linux
Additional context
I realize that there is no magic solution but perhaps by optimizing the data that passes between the OS and the application (via method channel), we can reduce the consumption of the necessary memory and drastically reduce this type of errors. I am thinking in particular at the transfer of bitmaps which are heavy in bytes.
I understand that for the web, the data that feeds the PdfRaster object is already in PNG format.
Given that the preview widget needs to convert the bytes of the bitmap into PNG, maybe we can take inspiration from the web and pass the PNG image directly in method channel ?
Describe the bug
Hello @DavBfr,
First of all, thank you for taking the time to develop this flutter library which is very useful.
I occasionally encounter crashes in production due to memory problems when previewing PDFs. I generate photo books, so some PDFs can contain more than 50 pages with lots of photos.
To Reproduce
Difficult to reproduce because it depends of the free memory in device
Expected behavior
Be able to generate the rasterization of the pdf without error
Desktop (please complete the following information):
Additional context
I realize that there is no magic solution but perhaps by optimizing the data that passes between the OS and the application (via method channel), we can reduce the consumption of the necessary memory and drastically reduce this type of errors. I am thinking in particular at the transfer of bitmaps which are heavy in bytes.
I understand that for the web, the data that feeds the PdfRaster object is already in PNG format.
Given that the preview widget needs to convert the bytes of the bitmap into PNG, maybe we can take inspiration from the web and pass the PNG image directly in method channel ?
I don't know Swift and if it's possible to do the same.
What do you thing about this proposal?
The text was updated successfully, but these errors were encountered: