-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Refactor annotation rectangle code and add unit tests #6239
Refactor annotation rectangle code and add unit tests #6239
Conversation
This patch refactors the code responsible for setting the annotation's rectangle. Its goal is to: - Actually check that the input array is actually an array, and if so, that it contains exactly four elements. - Only call `normalizeRect` if the input array is valid, i.e., we do not call it for the default rectangle anymore. Unit tests are provided just like with the other patches in this series.
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/20cc73d11341eb6/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/20cc73d11341eb6/output.txt Total script time: 0.63 mins Published |
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/4816199e6f98eb5/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.22.172.223:8877/ac13484e2a71470/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/ac13484e2a71470/output.txt Total script time: 18.61 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/4816199e6f98eb5/output.txt Total script time: 18.70 mins
|
Refactor annotation rectangle code and add unit tests
Looks good, thank you! |
This patch refactors the code responsible for setting the annotation's rectangle. Its goal is to:
normalizeRect
if the input array is valid, i.e., we do not call it for the default rectangle anymore.@Snuffleupagus Could you review this one? I have tested this patch manually (aside from with the unit tests) with 15 PDF files with different annotation types (Link, Text, Widget, FileAttachment, et cetera) to make sure that the rendering is identical before and after the patch.