svenssonaxel / pdf-sign

A tool to sign PDF files. With Linux support.
MIT License
118 stars 3 forks source link

Misinformation about okular #4

Closed v3ss0n closed 4 months ago

v3ss0n commented 11 months ago

Okular: Allows free-hand annotations, but not saving those for later use. Allows inserting custom saved stamps, but these will not be visible in other PDF readers.

Okular can save signatures as stamps fine and works under every pdf reader

svenssonaxel commented 11 months ago

@v3ss0n This information comes from Okular itself. I have Okular version 20.12.3. When I click for example "Approved", I first get a message box saying "Stamps inserted in PDF documents are not visible in PDF readers other than Okular". My test confirms this; after stamping a PDF, the stamp is visible in Okular when I open it again, but not in evince PDF reader.

If this information is still wrong or incomplete, could you elaborate?

svenssonaxel commented 11 months ago

@tsdgeos Do you have any input?

tsdgeos commented 11 months ago

You have an Okular version that is almost 3 years old at this point, use something newer and it will work. If you don't want to update your distribution you can use the flathub version that besides a few quirks works generally good (at least for testing things like this)

https://flathub.org/apps/org.kde.okular

v3ss0n commented 11 months ago

then something wrong with the way you do . I have been signing and sending contracts for years.

here is how you do

svenssonaxel commented 11 months ago

@v3ss0n @tsdgeos Thanks for your input. I'll try to test this and update the README accordingly.

svenssonaxel commented 11 months ago

@v3ss0n @tsdgeos I've now tried Okular version 23.04.3 via flatpak. In the Settings menu, I cannot find any Stamp option, neither in the Configure Okular screen. I am able to use a custom stamp this way:

The stamp is indeed visible in other PDF readers, so this works. As before, I can also draw a free-hand line annotation.

I experience the following rough edges (when using Okular for this particular use case):

Could you confirm the "rough edges" above, or help me work around them?

v3ss0n commented 11 months ago

The stamp seems to get rasterized when inserted, resulting in lower quality.

it is resterized , not a Vector. If it come out stretched , click ctrl + drag.

The option isn't saved to the stamp menu when the application is restarted.

you can choose from annotation menu. it is saved there.

I can't use a .pdf file as a stamp.

SVG and PNG only i think

svenssonaxel commented 11 months ago

it is resterized , not a SVG.

Not sure what you mean. I have an SVG file with vector graphics, you can zoom in arbitrarily far without pixelation, but when I use it as a stamp in Okular, it is pixelated.

you can choose from annotation menu. it is saved there.

I can see that it's saved in the stamp dropdown in the annotation menu, but when I restart the program, it's no longer there. Are you able to see the custom stamps in the menu after restarting Okular? @tsdgeos could this be because I'm using the flatpak version?

tsdgeos commented 11 months ago

@tsdgeos could this be because I'm using the flatpak version?

Possible

v3ss0n commented 11 months ago

@svenssonaxel the stamps i had made years ago are still there so it is saved. I am using Arch OS provided not flatpak.

svenssonaxel commented 11 months ago

@v3ss0n @tsdgeos Any comments on this proposed fix? I hope it doesn't sound too negative. Okular is a nice piece of software with a lot of functionality, but the context here is a complete focus on this one use case.

diff --git a/README.md b/README.md
index b518418..2f88d76 100644
--- a/README.md
+++ b/README.md
@@ -50,7 +50,8 @@ There appears to be a lack of applications that run on Linux and allow for attac
   Allows inserting images and .pdf files but will rasterize them rather than retain the vector graphics, resulting in lower quality.
 * **Okular:**
   Allows free-hand annotations, but not saving those for later use.
-  Allows inserting custom saved stamps, but these will not be visible in other PDF readers.
+  Allows inserting custom saved stamps, but will rasterize them rather than retain the vector graphics, resulting in lower quality.
+  (Older versions of Okular might save the stamps in a way that isn't visible in other PDF readers.)
 * **Evince:**
   Allows certain kinds of annotations, but nothing that can look like a free-hand signature.
 * **pdftk**, **ghostscript**, and other command-line tools:
v3ss0n commented 11 months ago
  • Allows inserting custom saved stamps, but will rasterize them rather than retain the vector graphics, resulting in lower quality.

Lower quality is wrong , i just tested my sign, on entry i did Shift Click + drag till full page , and there is no difference in quality. Restarization is only happens AFTER first entry .

  • (Older versions of Okular might save the stamps in a way that isn't visible in other PDF readers.)

Not fair to mention this since software features should only be compared in latest version basis . I have been using this feature for a couple years - so all the KDE Focused OSs already have okular of that version already.

svenssonaxel commented 11 months ago

Restarization is only happens AFTER first entry .

@v3ss0n I'm not entirely sure what you mean by that. I've made example stamps here to test rasterization:

As you can see when you open them, they show an X symbol. When I use example3.svg as a stamp in Okular, I get a quite pixelated stamp, both in the application and in the exported pdf file. When I use example3.pdf as a signature in pdf-sign, no such problem occurs. Do you get the same results?