Summary: | Annotations done on Mac OS X in PDF files show up as colored boxes in okular | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | Stefan Pflueger <kdebugs> |
Component: | general | Assignee: | Okular developers <okular-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aacid, fabiodurso, martin.sandsmark, mcframe, mzanetti, niburu1 |
Priority: | NOR | ||
Version: | 0.9.2 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.9.0 | |
Attachments: |
Example PDF created using OOo, annotation added using Mac OS X PDF viewer
Patch: Display text in annotation box, fixes positioning issue |
Description
Stefan Pflueger
2009-10-21 20:54:54 UTC
Created attachment 37713 [details]
Example PDF created using OOo, annotation added using Mac OS X PDF viewer
Yes, there is a mismatch between what okular thinks it's a Freetext annotation and what a FreeText annotation really is, that sucks and should be fixed if someone has time :-/ Created attachment 38199 [details]
Patch: Display text in annotation box, fixes positioning issue
I attached a small patch which
1) Uses GuiUtils::contents( annotation ) to get the text, the AnnotWindow does the same.
2) Fixes a positioning issue for freetext annotations: Box width/height for QFont.drawText are not scaled correctly, results in displaced/clipped text if zoomed in/out, particularly when using centered or right aligned text.
Anyway, PDF FreeText annotations are still far away from being displayed in the way it is specified.
There is a related issue when adding text boxes in Adobe Acrobat Pro. Okular renders the text, e.g. "font: 'Myriad Pro',sans-serif 12.0pt; text-align:left; color:#FF0000" instead of the actual text in the box. What is interesting is that whatever is used to generate thumbnails in KDE (e.g. Dolphin's preview) renders text boxes created in Acrobat Pro just fine. Any news on this? It is nearly impossible to use okular for professional tasks when annotations done by foreign applications do not render correctly. This cannot be hard to debug since those files render ok in most other linux pdf viewers. Fabio, master of annotations, can you have a look at this? With Poppler 0.20 and Okular 0.15 (ie from KDE 4.9) we now get the expected rendering, because we now let Poppler render the annotations, and Poppler uses the embedded appearance stream if it's present, like in this case. Previously, Okular used to draw all annotations, no matter whether Poppler had already rendered them or not. Therefore Poppler correctly showed the annotation, but Okular repainted it, wrongly, on top. *** Bug 238842 has been marked as a duplicate of this bug. *** |