[okular] [Bug 383651] Custom/image stamp annotations are not saved into the PDF file in a way that can be printed or that other readers can see

Tobias Deiminger bugzilla_noreply at kde.org
Tue Feb 6 08:26:37 UTC 2018


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

--- Comment #8 from Tobias Deiminger <haxtibal at posteo.de> ---
How about this breakdown? Boils down to the same root causes a bit...

Okular #1: Stamp Annotations are not printable
(I can confirm this, for both standard and non-standard icon names)
Root cause: PDF print requests are forwarded from Okular to the Poppler
generator (see PDFGenerator::print). But Poppler can't render stamps for two
reasons:
-Poppler doesn't implement default appearance streams for standard icon names,
so it can't render stamps like "Draft" and "Approved". See [1], "I leave the
bug open becuase there are still annotations missing default appearance streams
(Free Text annots, rubber stamp, ...)".
-Poppler can't generate/render/save an appearance streams for your custom
*.svg, *.png, whatever image yet. Displaying them in Okular on screen only
works because Okular renders stamps on its own.

Okular #2: Custom stamp annotations (i.e. non standard icon name) are not
visible in other readers
Root cause: If stamp is created by Okular+Poppler, no appearance stream is
generated/embedded into the PDF. Other readers should implement a default
appearance stream for standard icon names, but for non-standard icon names like
"kde", "okular", <path_to_local_file> they can't know what to display. Maybe of
interest is this pdf.js (firefox) issue [2]: "Most annotations, even
unsupported ones, render just fine in PDF.js because of their appearance
stream. However, there exist PDF files with annotations that do not have an
appearance stream (even though this is a deprecated practice). In the latter
case, PDF.js displays nothing.". There have been some thoughts about handling
of appearance streams in Poppler [3], but I don't know the current state and
desire there.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=23108#c21
[2] https://github.com/mozilla/pdf.js/issues/6810
[3] https://lists.freedesktop.org/archives/poppler/2009-June/004789.html

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


More information about the Okular-devel mailing list