Created attachment 116857 [details] farc-ep logo appears covered with stamp icon SUMMARY Images that had been pasted to a PDF with another PDF editor, e.g. Adobe Acrobat, appear in Okular covered with a stamp symbol. STEPS TO REPRODUCE 1. Open Acrobat 2. Press h to select hand tool 3. Press ctrl+v to insert an image from the clipboard 4. save pdf and open in okular OBSERVED RESULT The image appears covered by a stamp icon and is thus unreadable. EXPECTED RESULT Display the image as is, with no icon overlay. SOFTWARE/OS VERSIONS Windows: 10, 1803 Okular installed via Chocolatey: 1.6.70 ADDITIONAL INFORMATION
Very interesting. So the PDF was edited using the Windows version of Okular? Any chance you could edit the PDF with a Linux version and see if the issue reproduces?
Nate, no, he did not use Okular in Windows, he clearly mentions he used Adobe Acrobat. rubisco, please attach a document with this problem..
Read again: > SOFTWARE/OS VERSIONS > Windows: 10, 1803 > Okular installed via Chocolatey: 1.6.70 Chocolatey is a 3rd-party Windows package manager, so apparently he is using Okular for Windows.
Created attachment 116885 [details] farc-ep logo covered with stamp (PDF)
(In reply to Nate Graham from comment #3) > Read again: > > > SOFTWARE/OS VERSIONS > > Windows: 10, 1803 > > Okular installed via Chocolatey: 1.6.70 > > Chocolatey is a 3rd-party Windows package manager, so apparently he is using > Okular for Windows. Ah right, i thought you mentioned he had used Okular to add the stamp, my bad for not reading ^_^
Thanks for the file rubisco
Adobe Reader created a stamp annotation where /Name = #23clipboard. That's not any of the PDF standardized images, but it's portable anyway because Adobe Reader included a custom image representation along with the annotation inside the PDF. Our PDF renderer poppler took it and rendered the image, that's what you see in the background. Now Okular handles stamp annotations special: Because we know poppler has problems with stamps (can't save custom images, can't render stamps without embedded appearance), there's Okular code to draw the stamp instead on top of the page. Okular uses the information #23clipboard from /Name to look up an image with that name, but of course there is none. That's what you see in the foreground. An intermediate solution could be to bypass drawing a QPixmap in pagepainter.cpp if there was no image found by KIconLoader (use KIconLoader::MatchType::MatchExact and check for null pixmap or "unknown" pixmap). Will try to provide a patch. The root cause however is that (in the case of PDF) all stamp handling should solely be done by poppler, but poppler can't do it yet, and it's not easy to implement. See also https://bugs.kde.org/show_bug.cgi?id=383651.
(In reply to Tobias Deiminger from comment #7) > Adobe Reader created a stamp annotation where /Name = #23clipboard. That's > not any of the PDF standardized images, but it's portable anyway because > Adobe Reader included a custom image representation along with the > annotation inside the PDF. Our PDF renderer poppler took it and rendered the > image, that's what you see in the background. > > Now Okular handles stamp annotations special: Because we know poppler has > problems with stamps (can't save custom images, can't render stamps without > embedded appearance), there's Okular code to draw the stamp instead on top > of the page. Okular uses the information #23clipboard from /Name to look up > an image with that name, but of course there is none. That's what you see in > the foreground. > > An intermediate solution could be to bypass drawing a QPixmap in > pagepainter.cpp if there was no image found by KIconLoader (use > KIconLoader::MatchType::MatchExact and check for null pixmap or "unknown" > pixmap). Will try to provide a patch. Actually fixing this pdf "the right way" is not hard, we just need https://paste.kde.org/pk6wzgiqs in poppler and then a "backendPaintsStamp" or similar in the okular core annotation. I was working on this but if you want to pick it up i'm more than happy if you move it forward
I believe I'm seeing the same problem with a PDF document with Okular 1.10.3 on Arch Linux. Right clicking on the "stamp" shows "Stamp symbol: #clipboard". Moving the stamp keeps the actual image underneath (making it possible to view it), but the image likes to just disappear completely when scrolling/zooming and the document has to be re-opened to view the image again.
*** Bug 432849 has been marked as a duplicate of this bug. ***