Bug 508735 - Opening a PDF with text added by Firefox, Okular shows said text as an "inline note" with a transparent background.
Summary: Opening a PDF with text added by Firefox, Okular shows said text as an "inli...
Status: CONFIRMED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (other bugs)
Version First Reported In: 24.12.3
Platform: Ubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-25 22:05 UTC by Unlisted Person
Modified: 2025-10-14 08:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
sample pdf with text added by firefox. (26.42 KB, application/pdf)
2025-10-02 13:40 UTC, Unlisted Person
Details
Sample PDF saved in Firefox, then saved in Okular, then saved in Firefox. Transparent Text until you move it. (330.27 KB, application/pdf)
2025-10-07 14:47 UTC, Unlisted Person
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Unlisted Person 2025-08-25 22:05:32 UTC
SUMMARY. This is perhaps close to a duplicate of https://bugs.kde.org/show_bug.cgi?id=353401 . I understand that Typewriter is the Okular way to save text with a transparent background. 

This bug is because I saved a PDF in Firefox with text added and then opened the saved PDF in Okular. But instead of opening that text as "Typewriter," Okular showed the Firefox-added text as an inline note with a transparent background. 

It seems that either that text should be interpreted as "typewritter" for editing, or add the "transparent color" to the inline note. 

Browser:  Snap: Firefox  141.0.3-1  6638  latest/stable  mozilla
Okular: Apt: 4:24.12.3-0ubuntu2

STEPS TO REPRODUCE
1. Open a PDF on Firefox
2. Add text using Firefox
3. Save PDF using Firefox
4. Open PDF using Okular
5. Right click on text in Okular and Okular shows that text box as "Inline Text"
6. Select Properties and it shows "transparent" for the background color. 

OBSERVED RESULT

Inline Note with a transparent background. Can modify the note, but any attempt to change the background color resets to non-transparent. 

EXPECTED RESULT

Should open as "Typewriter Text" or be allowed to select a transparent background in the inline note to preserve  settings. 

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 25.04
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.3
Kernel Version: 6.14.0-27-generic (64-bit)
Graphics Platform: Wayland


ADDITIONAL INFORMATION
Comment 1 Albert Astals Cid 2025-09-02 21:25:53 UTC
Where is the PDF?
Comment 2 Bug Janitor Service 2025-09-17 03:48:28 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Unlisted Person 2025-09-17 11:23:13 UTC
(In reply to Albert Astals Cid from comment #1)
> Where is the PDF?

Locally saved.
Comment 4 Albert Astals Cid 2025-09-17 22:01:07 UTC
And why is it not attached to this issue so that we can try to reproduce the bug?
Comment 5 Bug Janitor Service 2025-10-02 03:46:29 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Unlisted Person 2025-10-02 13:40:48 UTC
Created attachment 185455 [details]
sample pdf with text added by firefox.

(In reply to Albert Astals Cid from comment #4)
> And why is it not attached to this issue so that we can try to reproduce the
> bug?

This happens with ANY pdf. Literally, ANY pdf. 

Here's one: https://community.adobe.com/havfw69955/attachments/havfw69955/acrobat-reader-mobile/17839/1/sample%20file.pdf 

Attached is that same PDF  where I added text by Firefox.  
( Now tested with Firefox 143.0.1 (64-bit) ) 

The text is 

```
Here is some sample text added by Firefox right before saving.
If you open it in Okular you will see it shows up as 
an inline note with a transparent background.
```

If I open it with Okular that text above shows up as an inline note with a transparent background.
Comment 7 Albert Astals Cid 2025-10-07 09:02:24 UTC
So left is firefox, right is okular

https://i.imgur.com/F8CxjfT.png

I can't see what the difference is.

Please help me figure it out
Comment 8 Unlisted Person 2025-10-07 14:39:16 UTC
(In reply to Albert Astals Cid from comment #7)
> So left is firefox, right is okular
> 
> https://i.imgur.com/F8CxjfT.png
> 
> I can't see what the difference is.
> 
> Please help me figure it out

See https://imgur.com/a/tlofFCJ with explanations below

Step 1. Edit text in Firefox (see Image 1) You can see past the text . I moved the text  over the green drawing for clarity.  Save the file. 

Step 2. Open that file in Okular. Note that the text is NOT "Typewriter" but "Inline Note"  Edit the "inline Note" properties  in Okular. Note that in editing the properties of that Inline note  There is no "transparent" option for the background color (or perhaps "no background color"?). Once you've picked any color and hit "apply" the inline note box covers everything behind it.  (See image 2 with Right click on the text and select properties and select "Color:" . )


Key points: 
  *  "transparent" or "no background" is NOT one of the possible options. 
  * If one clicks "Apply" with any changes affecting the background, you cannot get back to text with a transparent background in Okular.   

Save the file. 

Step 3. Edit the saved file in Firefox. The text now shows up with a transparent background again.  (not shown, but essentially the same as Image 3 below) . Save the file. 

Step 4. Edit that file again in Okular. (See image 3).  Note that the text background shows as  transparent again in Okular. 

Step 5. Just move that text box in Okular.  Only move it, nothing else. Suddenly the background is no longer transparent (See image 4) 

A PDF editing program (it's Firefox for me) that adds text  as an "inline note with a transparent background"  (or perhaps with the background color as unset?) makes Oklular give odd behavior when encountering that PDF. 

----
Updates since last note: 

Browser: firefox  143.0.1-1  6836  latest/stable  mozilla
Kernel: 6.14.0-29-generic
Comment 9 Unlisted Person 2025-10-07 14:47:52 UTC
Created attachment 185577 [details]
Sample PDF saved in Firefox, then saved in Okular, then saved in Firefox. Transparent Text until you move it.

This is the PDF after the following process. 
I'm calling the part we are operating a "text box" since in Firefox it's "text" and in Okular it's "inline note" 

1. Text added by Firefox, saved. "Text box" is transparent. 
2. Opened in Okular and changed properties to have background color = cyan,  "Text box" is not transparent. Saved
3. Opened in Firefox and text changed. "Text box" is transparent. Saved. 
4. Opened in Okular. "Text box" is transparent .... unless one moves said "text box" and then it instantly changes to not transparent. 

This file is the file that is opened in step 4.
Comment 10 Albert Astals Cid 2025-10-14 08:02:14 UTC
I think the problem here is that Okular/poppler consider the Color of the Annotation to be its background but if you read the PDF spec it says it should be 

"
used for the following purposes:
• The background of the annotation’s icon when closed
• The title bar of the annotation’s pop-up window
• The border of a link annotation
"

So there's a problem in the assumption of what the field does that ends up in this mismatch, not really simple to fix sadly