Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support strokeAlpha/fillAlpha when creating a fallback appearance stream (issue 6810) #13448

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented May 27, 2021

Fixes most of issue #13447; with only two things remaining (that I won't attempt here):

  • Support for non-default /LE-entries (line endings) in LineAnnotations, assuming we care about that.
  • The "weird" StrikeOutAnnotations with vertical lines, again assuming we want to fix that.

With this patch, while we still don't match Adobe Reader perfectly, we're doing a much better job overall than e.g. PDFium since all Annotations are now at least visible in the viewer.
For some Annotation-types without an included appearance stream, it definitely feels like we're getting into the territory of diminishing returns w.r.t. adding even more special-cases. At some point, it's feels very tempting to simply blame PDF generators for using more "exotic" Annotations and failing to including an appearance stream.

@Snuffleupagus Snuffleupagus force-pushed the _setDefaultAppearance-alpha branch 7 times, most recently from 761cacf to d792193 Compare May 27, 2021 11:38
@Snuffleupagus Snuffleupagus marked this pull request as draft May 27, 2021 11:39
@Snuffleupagus Snuffleupagus force-pushed the _setDefaultAppearance-alpha branch 4 times, most recently from 591e52b to c58d816 Compare May 27, 2021 13:51
@Snuffleupagus Snuffleupagus marked this pull request as ready for review May 27, 2021 14:12
…eam (issue 6810)

This fixes the colours, by respecting the strokeAlpha/fillAlpha-values, for a couple of Annotations in the PDF document from issue 13447.[1]

---
[1] Some of the annotations still won't render at all, when compared with Adobe Reader, but that could/should probably be handled separately.
…ries (issue 13447)

This extends PR 13106 to apply not only to empty /Rect-entries, but also to bogus /Rect-entries for various Annotation-types.
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/618819bc9e6fa1e/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/618819bc9e6fa1e/output.txt

Total script time: 25.96 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED

Image differences available at: http://54.67.70.0:8877/618819bc9e6fa1e/reftest-analyzer.html#web=eq.log

@timvandermeij
Copy link
Contributor

/botio-windows preview

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://3.101.106.178:8877/4d957a53c602755/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://3.101.106.178:8877/4d957a53c602755/output.txt

Total script time: 7.25 mins

Published

@timvandermeij timvandermeij merged commit a0ce3cb into mozilla:master May 28, 2021
@timvandermeij
Copy link
Contributor

Thank you for fixing this, also for the other markup annotation types that according to the spec also support the CA property! I forgot about CA before since I had no test cases that actually used it and I also postponed custom line endings because they seemed very rare.

/botio makeref

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_makeref from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/60904143b35aadc/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_makeref from @timvandermeij received. Current queue size: 2

Live output at: http://3.101.106.178:8877/f94fa333654b257/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/60904143b35aadc/output.txt

Total script time: 22.80 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://3.101.106.178:8877/f94fa333654b257/output.txt

Total script time: 27.03 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants