Bug 402939 - Annotation workflow is completely broken
Summary: Annotation workflow is completely broken
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 1.4.3
Platform: Ubuntu Linux
: NOR critical
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-06 19:45 UTC by DimanNe
Modified: 2019-01-07 10:49 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DimanNe 2019-01-06 19:45:57 UTC
I wanted to add my signature (image, not cryptographic one) into a pdf document. So I decided to use the Annotation feature of Okular, found that Stamp was what I looking for.

Here was the first problem - it is completely impossible (from the given interface) to understand how I am supposed to add my own image in the list of available stamps.

Well, after some googling I found your help (which is wrong, actually):
https://docs.kde.org/trunk5/en/kdegraphics/okular/configannotations.html
Using Custom Stamps
* Create the icon you want to use for your own stamp and save it in any graphics format supported by Okular
* Click the Add button, select type Stamp and enter a name for your stamp.
* Enter the full path to your custom icon into the dropdown box in the Stamp Symbol group

My path was "/home/dimanne/Downloads/DimanNeSignature.png" - it did not work.
After more googling I found out that I should have somehow understood that the path must be in lowercase - https://superuser.com/a/1325085/981679
At least, you should have written it in the help, instead of making people debug Okular with strace.

Well, after renaming to lowercase I managed to get it on my PDF (it is still ugly since you downscale it drastically and it looks distorted, but anyway, it was passable).

Finally, I have went all the path only to know that the signature can not be saved in resulting (annotated) PDF - https://bugs.kde.org/show_bug.cgi?id=383651


What is wrong with Okular?
Comment 1 Oliver Sander 2019-01-06 20:14:50 UTC
> What is wrong with Okular?

Not enough manpower.  Can you code?
Comment 2 DimanNe 2019-01-06 20:31:04 UTC
Yes, I can.

Do you know where exactly in code I can start to look?
Comment 3 Albert Astals Cid 2019-01-06 23:17:43 UTC
So you have found we have bugs.

Congratulations, using fixed as reason since there's not really a different better resolution for "yeah, it's broken, we know and there's several bugs about it already"
Comment 4 Oliver Sander 2019-01-07 10:49:14 UTC
DimanNe, what Albert is saying is that your report, while factually correct, is not specific enough to be very helpful.  For example, it mentions at least three separate problems together.  In the future, please open separate reports for each of them (unless they are already known).

Now it's great to hear that you are interesting in helping out a little.  Welcome to Okular development.  It is actually not all that difficult.  Have you tried building Okular locally already?

The easiest task for you to begin would be to improve the documentation on stamp handling.  The source code for that documentation is in doc/index.docbook.

Next you could have a look on why file names need to be in lower-case.  That smells like a bug to me (but I am no expert).  Is there an existing bug report for this?  If no, please open one.  Unfortunately, I cannot tell you off-hand where to look in the code for that problem, but simply grepping for 'annotation', 'stamp' etc should get you a long way.

About not being able to save stamp annotations in pdf files: That is actually quite an involved problem, and will take a number of steps.  Tobias Deiminger is the expert here.  It is even a project proposal for the upcoming season of GSoC: 

  https://community.kde.org/GSoC/2019/Ideas

Maybe you are interested?