Created attachment 174060 [details] Test file Signing a small pdf file increases its size a lot. The attached test file goes from 24KB to 17MB. I guess a bit of size increase is expected, but not that much. SOFTWARE/OS VERSIONS Operating System: Debian GNU/Linux 12 KDE Plasma Version: 5.27.11 KDE Frameworks Version: 5.115.0 Qt Version: 5.15.13 Kernel Version: 6.10.9-amd64 (64-bit) Graphics Platform: offscreen Processors: 8 × Intel® Core™ i7-8565U CPU @ 1.80GHz Memory: 15.3 GiB of RAM Graphics Processor: Mesa Intel® UHD Graphics 620
I can't attach the signed test file (it's too big), but you can download it from https://datashare.tu-dresden.de/s/XDjHYGzpdd2jtCo .
The size increase comes from Noto fonts being embedded into the file now
Is that intentional? Is that necessary? All of a sudden Thunderbird warns me when I want to send a signed one-page text document, because the file is so big.
(In reply to Oliver Sander from comment #3) > Is that intentional? Is that necessary? All of a sudden Thunderbird warns me > when I want to send a signed one-page text document, because the file is so > big. I really hope it is not intentional. I have put quite some resources into not embedded fonts for the fun of it; only those that are actually used. This file seems to have following embedded: BAAAAA+LiberationSerif Helvetica Noto Sans CJK JP Regular Arimo Regular FreeSans Regular DejaVu Sans Book The first one is likely the original subsetted font from the original document, and the other ones are added as part of the signature creation? Oliver: can you confirm with `pdffonts` that the original document only embeds the subsetted LiberationSerif font ?
The original document is the one attached to this bug report. ~/tmp> pdffonts hallo-welt.pdf name type encoding emb sub uni object ID ------------------------------------ ----------------- ---------------- --- --- --- --------- BAAAAA+LiberationSerif TrueType WinAnsi yes yes yes 11 0 ~/tmp>
Yeah. the new signature flow in poppler mishandles text encoding and thus everything looks like weird unicode glyphs to the font embedding code.
https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/1611
Thank you Sune! I tested the patch and it does indeed solve the issue for me! Incidentally, it also seems to fix https://bugs.kde.org/show_bug.cgi?id=493623 for me (where Okular wouldn't react for a while after signing). Maybe it was embedding all those fonts that make Okular unresponsive.
(In reply to Oliver Sander from comment #8) > Thank you Sune! I tested the patch and it does indeed solve the issue for me! > > Incidentally, it also seems to fix > https://bugs.kde.org/show_bug.cgi?id=493623 for me (where Okular wouldn't > react for a while after signing). Maybe it was embedding all those fonts > that make Okular unresponsive. It uses a bit of time to find and process the fonts, yes. So it could very well be that. Will mark this and the other as fixed upstream.