[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
Mon Feb 5 07:52:09 UTC 2018


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

Tobias Deiminger <haxtibal at posteo.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |haxtibal at posteo.de

--- Comment #6 from Tobias Deiminger <haxtibal at posteo.de> ---
Just had a look into it, this is what I found. Dependent on users choice,
Okular sets the annotation dicts /Name entry to standard names ("Approved",
"Confidential", ... see PDF 32000-1:2008, chapter 12.5.6.12 Rubber Stamp
Annotations, Table 181), but also to non standard names ("okular", "kde",
<path_to_your_custom_image>). Conforming readers implement a representation for
the standard names (may look a bit different as in Okular, but at least
something reasonable is shown). But of course non standard names like "okular",
"kde", <some_local_path> are not understood by other readers. A portable way to
have such custom stamps would be to add an /AP entry with the full icon
representation into the PDF. Unfortunately, Poppler can't generate appearance
streams for stamps yet. Note that Poppler #23108 is a bit different, it is
about hardcoded default appearance streams, not about generating ones for your
custom image.

There's another special thing about stamps. Contrary to most other annotation
types, stamps are not rendered by Poppler, but by Okular itself. Okular first
looks for /Name in ui/data/stamps.svg (contains "approved", "confidential",
"departmental"...). If there's no match, it uses KIconLoader lookup an icon.
Not rendering with Poppler probably introduces special handling when printing,
haven't checked that yet.

I guess an ideal solution for this bug will require aid from Poppler side
(maybe a new API to store raster and vector graphics as appearance stream into
the PDF, and some predefined appearance streams for the standard names so that
stamps without /AP can be rendered).

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


More information about the Okular-devel mailing list