SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** When I type in text into a PDF file using Okular, or highlight text, the file size goes up exponentially. A 800kB file will go up to 9MB with just one Typewriter note. At its worst, I have had a small 3 page file go up to 91 MB after I typed in notes and highlighted text. The problem is so bad that I have looked for alternative PDF readers to use, and am about to delete Okular from my system. I am not a programmer so I have no idea what you need me to report here or what "component" I'm supposed to be reporting, only that Okular has become unusable for me. STEPS TO REPRODUCE 1. Typing in text using Typewriter tool or highlighting text using Highlighter 2. File size increases exponentially 3. OBSERVED RESULT EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
I use okular 23.04.1 version in Endeavour OS and have the same symptoms.
What versions of poppler is involved. There had been some bugs, but fixed by 23.06 version of poppler that make it grow extremely much (By wrongly embedding the same fonts over and over again).
To be a little more specific, I'm using version 23.04.2 and even putting a little text in a 3kb file increases it significantly to 15.7mb, like this. - Original: https://www.africau.edu/images/default/sample.pdf - Large File: https://drive.google.com/file/d/1zJg2fm5N5SgKJbNEjuMbMMJEPkskHd5h/view?usp=sharing If you need to reproduce it, is there anything I can do to help?
Poppler is the underlying library that Okular uses for rendering pdf's and for writing annotations into pdf's. What version of poppler are you using ? The version `alstjr7375` is using has a bug that was fixed recently where the same font gets embedded multiple times. In your "large file" example, the same font is embedded 6 times; a bug that was fixed probably in poppler 23.06. So please update to a newer poppler.
Thanks for the quick reply. I checked the package and `poppler` hasn't been updated yet. (I thought the `poppler` library was described as pop-up note, a function of okular) ``` poppler 23.05.0-1 poppler-data 0.4.12-1 poppler-glib 23.05.0-1 poppler-qt5 23.05.0-1 ``` Then, I'll wait for an update on Arch Linux!!! https://archlinux.org/packages/extra/x86_64/poppler/
Thank you!! It seems that the font is only embedded once. (Keep in 2MB) I think it has been solved now. After the update, the package version is as follows: ``` poppler 23.06.0-1 poppler-data 0.4.12-1 poppler-glib 23.06.0-1 poppler-qt5 23.06.0-1 ```
thanks for confirming. Marking as fixed upstream (Poppler)
Thanks for the response. Can you recommend a way to get rid of these superfluous embedded fonts from PDF files that were already affected by this bug? I made dozens of time-consuming annotations to a PDF file, saving it dozens of times in between, before i realized (because okular became very unresponsive!) that the file size had grown from 6.4 MB to... 220 MB (!). It would be very time-consuming to redo all annotations with the fixed poppler version... but it is also be very unpleasant having to deal with such a huge file! Thanks.