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

Correctly order added annotations when saving or printing #15089

Merged
merged 1 commit into from
Jun 23, 2022

Conversation

calixteman
Copy link
Contributor

  • the annotations must be rendered in the same order as the chronological one.
  • fix a bug in document.js which avoids to read a saved pdf correctly in Acrobat:
    there is no need to reset the xref state: it's done in worker.js once everything
    has been saved.

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.

Fixing a bug by removing code is the best kind of patch :-)

r=me, with passing tests; thank you!

Comment on lines 281 to 284
const results = await Promise.all(promises);

return {
annotations: results,
Copy link
Collaborator

@Snuffleupagus Snuffleupagus Jun 23, 2022

Choose a reason for hiding this comment

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

Given the changes here, this could possibly be simplified even further now?

Suggested change
const results = await Promise.all(promises);
return {
annotations: results,
return {
annotations: await Promise.all(promises),

- the annotations must be rendered in the same order as the chronological one.
- fix a bug in document.js which avoids to read a saved pdf correctly in Acrobat:
  there is no need to reset the xref state: it's done in worker.js once everything
  has been saved.
@calixteman
Copy link
Contributor Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/85745c54004166d/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/f7561a9aa96d9f5/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/85745c54004166d/output.txt

Total script time: 26.06 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 24
  different first/second rendering: 1

Image differences available at: http://54.241.84.105:8877/85745c54004166d/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/f7561a9aa96d9f5/output.txt

Total script time: 27.67 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 1

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

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

Successfully merging this pull request may close these issues.

3 participants