https://bugs.kde.org/show_bug.cgi?id=517074
Bug ID: 517074
Summary: "Print to File (PDF)" generates a structurally quirky
PDF that attaches as "0 bytes" in Chromium webmail,
despite looking valid locally.
Classification: Applications
Product: okular
Version First 25.12.2
Reported In:
Platform: Fedora RPMs
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: printing
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
"Print to File (PDF)" generates a structurally quirky PDF that attaches as "0
bytes" in Chromium webmail, despite looking valid locally.
SUMMARY
STEPS TO REPRODUCE
1. Open any PDF in Okular.
2. Add some annotations (e.g., a Stamp annotation with a PNG signature, and
some Text).
3. Go to File -> Print -> Select Print to File (PDF) to flatten the annotations
into a new file.
4. Open Chromium, go to Gmail, and try to attach this newly generated PDF to an
email.
OBSERVED RESULT
Chromium/Gmail rejects the attachment, or it attaches completely empty (showing
a "0 bytes" error).
EXPECTED RESULT
The file should be uploaded correctly with its full size.
SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 43
KDE Plasma Version: 6.6.0
KDE Frameworks Version: 6.23.0
Qt Version: Using 6.10.2 and built against 6.10.1
Kernel Version: 6.18.12-200.fc43.x86_64 (64-bit)
Graphics Platform: Wayland
Okular: 25.12.2
Build ABI: x86_64-little_endian-lp64
Kernel: linux 6.18.12-200.fc43.x86_64
Browser: Chromium (Native rpm, NOT flatpak)
Email Provider: Gmail
ADDITIONAL INFORMATION
The issue definitely comes from the file generated by Okular's printing
backend, not from a browser sandbox issue (Chromium is not sandboxed here).
Interestingly, the file looks perfectly healthy locally:
Visible in Dolphin showing correct size (e.g., 316 KB).
Opens fine in Okular.
file my_file.pdf returns: PDF document, version 1.4
ls -la my_file.pdf returns fine permissions (-rwxrwxrwx)
pdfinfo my_file.pdf shows:
Creator: poppler pdftops version: 25.07.0
Producer: GPL Ghostscript 10.05.1
The Workaround that proves the bug:
If I don't use "Print to File", but instead use Okular's "Save As" (which keeps
annotations as editable objects), and then manually flatten the file in the
terminal using pdftk input.pdf output final.pdf flatten, the resulting file
attaches perfectly to Gmail via Chromium (this also works on the printed pdf).
This implies that the Okular/Ghostscript "Print to PDF" pipeline produces a
file with a corrupted EOF (End of File) marker, or a specific structural quirk
that triggers a silent security rejection from Chromium's upload picker or
Gmail's attachment scanner.
--
You are receiving this mail because:
You are watching all bug changes.