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

Implement rendering square/circle annotations without appearance stream #13031

Conversation

timvandermeij
Copy link
Contributor

Fixes another part of #6810.

@timvandermeij timvandermeij force-pushed the annotation-square-circle-no-appearance-stream branch from 6e42f37 to 04eb81b Compare February 27, 2021 15:25
@timvandermeij
Copy link
Contributor Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/df753c0cba08f77/output.txt

@timvandermeij timvandermeij force-pushed the annotation-square-circle-no-appearance-stream branch from 04eb81b to 1dfd84f Compare February 27, 2021 15:30
@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/df753c0cba08f77/output.txt

Total script time: 4.06 mins

Published

@timvandermeij
Copy link
Contributor Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/9f4e1f34fb6d592/output.txt

@@ -2278,6 +2291,43 @@ class SquareAnnotation extends MarkupAnnotation {
super(parameters);

this.data.annotationType = AnnotationType.SQUARE;

if (!this.appearance) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to help me understand the differences between Annotation types:

It seems that a few of existing .... extends MarkupAnnotation-cases only does this when quadPoints is defined, note e.g. HighlightAnnotation, hence I wonder what's different between the various Annotation types here?

Copy link
Contributor Author

@timvandermeij timvandermeij Feb 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question! I looked into the specification and found that the existing annotation types that do the quadpoints check, namely highlight/squiggly/underline/strikethrough, are text markup annotations and those are required to have quadpoints; see https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf#page=411&zoom=auto,-215,424. Circle and square annotations on the other hand are regular markup annotations and for those quadpoints are not defined; see https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf#page=399&zoom=auto,-215,760.

In our implementation we don't make this distinction because for how we work with them this difference is irrelevant. The overview at https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf#page=398&zoom=auto,-215,775 shows which annotation types are markup annotations and it also shows that highlight/squiggly/underline/strikethrough annotations belong to the text markup annotation "subcategory". The reason is that they are always applied to text, whereas squares/circles/other markup annotations are not text-related and can be used anywhere in the document.

Hopefully this helps a bit to clear things up :-)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully this helps a bit to clear things up :-)

That's indeed very helpful, thank you!

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/9f4e1f34fb6d592/output.txt

Total script time: 24.03 mins

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

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

@calixteman
Copy link
Contributor

/botio-windows test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

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

Total script time: 28.99 mins

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

Image differences available at: http://3.101.106.178:8877/df45bbaa59535f1/reftest-analyzer.html#web=eq.log

src/core/annotation.js Outdated Show resolved Hide resolved
src/core/annotation.js Show resolved Hide resolved
@timvandermeij timvandermeij force-pushed the annotation-square-circle-no-appearance-stream branch from 1dfd84f to fa6cebf Compare February 27, 2021 18:07
@timvandermeij
Copy link
Contributor Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/ed1960a6e9f82f6/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/ed1960a6e9f82f6/output.txt

Total script time: 4.19 mins

Published

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me, with passing tests.

This looks great, thanks for improving the "no appearance stream"-support!

@Snuffleupagus
Copy link
Collaborator

/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/c33d10e53b70397/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

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

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/c33d10e53b70397/output.txt

Total script time: 24.54 mins

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

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

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

Total script time: 29.05 mins

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

Image differences available at: http://3.101.106.178:8877/ad9f55cecbadbdc/reftest-analyzer.html#web=eq.log

@Snuffleupagus
Copy link
Collaborator

/botio makeref

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/e9e75eee0697748/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

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

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/e9e75eee0697748/output.txt

Total script time: 22.05 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/f86f895e222babd/output.txt

Total script time: 26.65 mins

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

@timvandermeij timvandermeij merged commit 5f37d4e into mozilla:master Feb 28, 2021
@timvandermeij timvandermeij deleted the annotation-square-circle-no-appearance-stream branch February 28, 2021 13:47
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.

4 participants