Skip to content

Conversation

@samiuc
Copy link
Contributor

@samiuc samiuc commented Jul 23, 2025

Currently, when doc.export_to_html() is called on a document with invalid geometry (e.g., a bounding box where y_max < y_min), Pillow's underlying crop function raises a ValueError. This causes the entire visualization process to crash, preventing the generation of reports if even one document has bad data.

The PR logs the error with the specific page number and continues processing the remaining pages and documents. It inserts a clear error message directly into the generated HTML for the page that failed to render.

@mergify
Copy link

mergify bot commented Jul 23, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@github-actions
Copy link
Contributor

DCO Check Failed

Hi @samiuc, your pull request has failed the Developer Certificate of Origin (DCO) check.

This repository supports remediation commits, so you can fix this without rewriting history — but you must follow the required message format.


🛠 Quick Fix: Add a remediation commit

Run this command:

git commit --allow-empty -s -m "DCO Remediation Commit for samiullahchattha <Sami.Ullah1@ibm.com>

I, samiullahchattha <Sami.Ullah1@ibm.com>, hereby add my Signed-off-by to this commit: 4d1cf05d9a3f1f74618cc16692c4170dad5c905e"
git push

🔧 Advanced: Sign off each commit directly

For the latest commit:

git commit --amend --signoff
git push --force-with-lease

For multiple commits:

git rebase --signoff origin/main
git push --force-with-lease

More info: DCO check report

@samiuc samiuc requested review from cau-git and divekarsc July 23, 2025 19:55
@samiuc samiuc self-assigned this Jul 23, 2025
@samiuc samiuc merged commit c31b107 into main Jul 24, 2025
10 checks passed
@samiuc samiuc deleted the sami/fix-invalid-bbox-cordinates branch July 24, 2025 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants