Bug 499711 - PDF: Gradients and Patterns in Stroke are Broken
Summary: PDF: Gradients and Patterns in Stroke are Broken
Status: RESOLVED MOVED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 24.12.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-09 06:03 UTC by doctormo@geek-2.com
Modified: 2025-02-09 07:08 UTC (History)
1 user (show)

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


Attachments
Acrobate example (43.06 KB, image/png)
2025-02-09 06:03 UTC, doctormo@geek-2.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description doctormo@geek-2.com 2025-02-09 06:03:51 UTC
Created attachment 178090 [details]
Acrobate example

SUMMARY

Gradients and Patterns which are defined before the BT command should work for strokes just like fills but don't.

This research has been carried out in issue: https://github.com/jpakkane/capypdf/issues/80

STEPS TO REPRODUCE
1. Open the output.pdf linked above
2. View the 3rd page STROKE OUTSIDE

OBSERVED RESULT

Gradient and Pattern sections are wrong compared to Acrobat output.

EXPECTED RESULT

See acrobat.png

ADDITIONAL INFORMATION

There's a side note that Okular is parsing the Pattern fills inside the BT block too, though Acrobat does not.
Comment 1 Oliver Sander 2025-02-09 06:57:17 UTC
This is very likely a poppler problem. Please check whether you can reproduce the misrendering using the pdftoppm command line tool, which uses the same rendering code that Okular does. If pdftoppm shows the same problem, please open a bug report at 

  https://gitlab.freedesktop.org/poppler/poppler/-/issues

Otherwise, come back here and re-open this report.

Thank you!
Comment 2 doctormo@geek-2.com 2025-02-09 07:01:14 UTC
Note that Evince also has issues, but they are not the same as Okular. A curious poppler problem.
Comment 3 Oliver Sander 2025-02-09 07:08:20 UTC
Poppler contains several render engines, and they can all be buggy in different ways.

* Okular uses the 'Splash' render engine. Use pdftoppm to test it from the command line.
* Evince uses the Cairo engine. Use pdftocairo to test it from the command line.

So if you are having problems with Evince too, please test with pdftocairo and then file
a separate(!!) poppler bug.