-
Notifications
You must be signed in to change notification settings - Fork 36
Fix shifted bounding boxes calculation #80
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
Conversation
|
@codex review |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
| BoundingBox box = DocumentProcessor.getPageBoundingBox(boundingBox.getPageNumber()); | ||
| if (box != null) { | ||
| boundingBox.move(box.getLeftX(), box.getBottomY()); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid mutating bounding boxes while drawing annotations
The new translation in draw moves the passed BoundingBox directly. These bounding boxes live in the contents collection, which is reused after PDF generation to emit JSON/HTML/text in DocumentProcessor.processFile. As a result, calling updatePDF now permanently shifts every bounding box and the coordinates serialized later depend on whether PDF generation ran beforehand. The filtering code in the same commit avoids this by translating a copy. Consider shifting a temporary copy for annotation placement instead of mutating the shared object.
Useful? React with 👍 / 👎.
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. |
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
java/opendataloader-pdf-core/src/main/java/org/opendataloader/pdf/pdf/PDFWriter.java
Show resolved
Hide resolved
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. |
Checklist: