[okular] [Bug 484601] New: Okular should not (by default) embed the ENTIRE font file into the saved PDF document when Typewriter annotations are added.

ๆž—ๅšไป bugzilla_noreply at kde.org
Wed Mar 27 13:58:34 GMT 2024


https://bugs.kde.org/show_bug.cgi?id=484601

            Bug ID: 484601
           Summary: Okular should not (by default) embed the ENTIRE font
                    file into the saved PDF document when Typewriter
                    annotations are added.
    Classification: Applications
           Product: okular
           Version: 24.02.1
          Platform: Flatpak
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: PDF backend
          Assignee: okular-devel at kde.org
          Reporter: Buo.Ren.Lin at gmail.com
  Target Milestone: ---

Created attachment 167846
  --> https://bugs.kde.org/attachment.cgi?id=167846&action=edit
Size differences between the original document and the one with the typewriter
annotations

SUMMARY

I was going to sign a PDF document using Okular but found that after signing it
using the Typewriter annotations feature the resulting PDF document's file size
becomes >15MiB.  It turns out that Okular embeds the ENTIRE font file of the
Chinese font I'm using but not a subset of it required by the annotation text
itself, making the resulting file size 260x than the original.

This is a serious problem as:

* The resulting file will likely no longer be attachable to an e-mail due to
the oversized file.
* The resulting file may no longer be legally distributed as it may violate the
license of the embedded font(only subset distribution of the glyphs is
allowed).

STEPS TO REPRODUCE
1. Open a PDF document, and note the original file size of the file.
2. Add a Typewriter annotation that consists of characters that can only be
rendered by a big-scaled font (e.g. Chinese by "Noto Sans CJK").
3. Save the PDF document.

OBSERVED RESULT

The entire Chinese font(instead of its subset) is embedded in the document(as
per the attached screenshot).

EXPECTED RESULT

Okular should embed the subset of the font required to render the Typewriter
annotations by default, or at least provide an option to opt-off the current
behavior.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Okular 24.02.1 Flatpak @ Ubuntu 23.10 Desktop
(available in About System)
KDE Plasma Version: 5.27.8
KDE Frameworks Version: Flatpak: 6.0.0 @ Host: 5.110.0
Qt Version: Flatpak: 6.6.2 @ Host: 5.15.10

ADDITIONAL INFORMATION

Use [the Static Super-OTC variant of the Noto Sans CJK
font](https://github.com/notofonts/noto-cjk/releases/download/Sans2.004/00_NotoSansCJK.ttc.zip)
creates a PDF document that is 1233x of the original file's size.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list