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

Add support for checkboxes printing #12107

Merged
merged 1 commit into from
Jul 29, 2020
Merged

Conversation

calixteman
Copy link
Contributor

This patch allows to print filled checkbox with the appearance they've in the PDF file.

Copy link
Contributor

@timvandermeij timvandermeij left a comment

Choose a reason for hiding this comment

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

Comments from an intial look. Could you also rebase onto the current master so we only have the relevant checkbox changes in here? It will be a bit easier to review and test then. Thanks!

@timvandermeij
Copy link
Contributor

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

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/937a7131b043f03/output.txt

Total script time: 3.35 mins

Published

@timvandermeij
Copy link
Contributor

I'm going to play around with it a bit more, but it works really well so far!

@lundjordan lundjordan added the Gecko 81 Tracking work planned for Form Fill in Shirley 81 release label Jul 27, 2020
Copy link
Contributor

@timvandermeij timvandermeij left a comment

Choose a reason for hiding this comment

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

Looks good to me once these comments are addressed.

this.appearance = savedAppearance;
return operatorList;
}
return Promise.resolve(new OperatorList());
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we treat this case just like the caser where we have no annotationStorage, i.e., let this fall through and let the parent class handle it? I would think we only want to special-case the case where we have a value and a checked appearance; any other case would need the default parent getOperatorList call.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we've a checked box (in the base pdf) and we uncheck it then falling through implies that we'll print a checked box.
Anyway in reading the spec, we can have a "Off" appearance so I need to handle that case.

@timvandermeij
Copy link
Contributor

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

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/598f85f1af0467e/output.txt

Total script time: 3.32 mins

Published

Copy link
Contributor

@timvandermeij timvandermeij left a comment

Choose a reason for hiding this comment

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

Good to merge once the final comment is addressed!

@timvandermeij
Copy link
Contributor

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/e0596aee95534bd/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/3c8527759855506/output.txt

Total script time: 15.86 mins

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

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.215.176.217:8877/e0596aee95534bd/output.txt

Total script time: 17.86 mins

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

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

@timvandermeij timvandermeij merged commit eb4d6a0 into mozilla:master Jul 29, 2020
@timvandermeij
Copy link
Contributor

Nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
annotations form-acroform Gecko 81 Tracking work planned for Form Fill in Shirley 81 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants