-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(client) Handle RGB pages not fitting in temporary directories #526
Comments
Possible solutions
From the above solutions, it seems that (2) is the one we should go with. WorkaroundsIf you are a user that has this problem, you can consider the following workarounds, if you are on Linux:
|
We also need to find out if this affects Windows / MacOS platforms, i.e., if |
I agree with this. And we can use the pillow python module to convert from rgb to png (or if needed even PDF). |
Storing all RGB files in the host were leading to a fast-filling `/tmp`. This solution essentially converts all the RGB files to PNGs (which are compressed) saving valuable space in the process. This conversion is made with the Pillow (PIL) module, without the need for any external dependencies. Fixes #526
Storing all RGB files in the host were leading to a fast-filling `/tmp`. This solution essentially converts all the RGB files to PNGs (which are compressed) saving valuable space in the process. This conversion is made with the Pillow (PIL) module, without the need for any external dependencies. Fixes #526
As part of #625, we no longer store RGB files in temporary directories. The safe PDF is now created on the fly, and each page is compressed immediately, once it's received from the conversion sandbox. This means that there will be at most 1 uncompressed RGB page in-flight at all times. The rest of the pages will be compressed, which really improves the situation. |
(this issue is a follow up of #518, best done after #443)
The size of a single A4 page in pixels is:
We also need to account for 3 color channels too (RGB), meaning that the final size in bytes is:
If we have 1 GiB of RAM available, we need 716 pages (72 DPI) or 165 pages (150 DPI) to fill it up. It seems that
pdftoppm
does use 150 DPI by default for the conversion to PPM, meaning that users with limited RAM (e.g., 1 GiB) will not be able to convert PDFs with more than 165 pages. Note that this is the case because we store the RGB files in a temporary directory as a result of the conversion to pixels.This is a limitation that does not affect all users or files, but we need to find a solution for it.
The text was updated successfully, but these errors were encountered: