Repository navigation
Refactor annotation rectangle code and add unit tests - #6239
Merged
Merged
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.
Collaborator
Author
|
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 |
Collaborator
Author
|
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 |
From: Bot.io (Windows)SuccessTotal script time: 18.61 mins
|
From: Bot.io (Linux)SuccessTotal script time: 18.70 mins
|
Snuffleupagus
added a commit
that referenced
this pull request
Jul 20, 2015
Refactor annotation rectangle code and add unit tests
Collaborator
|
Looks good, thank you! |
1 task
zzeleznick
added a commit
to zzeleznick/pdf2json
that referenced
this pull request
Mar 10, 2023
gayanMatch
added a commit
to gayanMatch/convert-pdf-json
that referenced
this pull request
Jun 10, 2023
modesty
pushed a commit
to modesty/pdf2json
that referenced
this pull request
Nov 10, 2023
dark-knjn
added a commit
to dark-knjn/convert-pdf-json
that referenced
this pull request
Jul 18, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch refactors the code responsible for setting the annotation's rectangle. Its goal is to:
normalizeRectif 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.