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

[Editor] Add support for printing/saving newly added Stamp annotations #16588

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

calixteman
Copy link
Contributor

In order to minimize the size the of a saved pdf, we generate only one image and use a reference in each annotation using it. When printing, it's slightly different since we have to render each page independantly but we use the same image within a page.

@calixteman calixteman requested a review from Snuffleupagus June 22, 2023 18:19
@calixteman calixteman linked an issue Jun 22, 2023 that may be closed by this pull request
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.

Adding a few comments/questions based on an initial look.

Given that there's a Firefox, and hopefully also a PDF.js library, release coming in a week I don't believe that we want to land Stamp-editing just prior to that, to allow us more time to test it and iron out any bugs.
Hence why I started with reviewing this patch, since I believe that we'll be able to land this right away (once reviewed/tested) given that it doesn't add any user-visible functionality.

src/display/api.js Show resolved Hide resolved
src/core/worker.js Show resolved Hide resolved
src/core/document.js Show resolved Hide resolved
src/core/annotation.js Outdated Show resolved Hide resolved
src/core/annotation.js Show resolved Hide resolved
src/core/annotation.js Show resolved Hide resolved
src/core/annotation.js Outdated Show resolved Hide resolved
src/core/annotation.js Outdated Show resolved Hide resolved
In order to minimize the size the of a saved pdf, we generate only one
image and use a reference in each annotation using it.
When printing, it's slightly different since we have to render each page
independantly but we use the same image within a page.
@Snuffleupagus
Copy link
Collaborator

Once #16588 (comment) has been checked, please run all tests.

@calixteman
Copy link
Contributor Author

/botio test

@moz-tools-bot
Copy link
Collaborator

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/4d03d7194fed180/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/2031f48808ca6d8/output.txt

Total script time: 25.25 mins

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

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/4d03d7194fed180/output.txt

Total script time: 38.59 mins

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

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

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.

This should be fine to land right away (given the upcoming PDF.js release), since none of this functionality is currently exposed in the viewer.

r=me, thank you!

@calixteman calixteman merged commit 88c7c8b into mozilla:master Jun 28, 2023
@calixteman
Copy link
Contributor Author

/botio makeref

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/2a6160c9b552e8d/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

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

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/2a6160c9b552e8d/output.txt

Total script time: 20.61 mins

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

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

Total script time: 25.53 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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create and save STAMP/Image annotation
3 participants