Skip to content

Fix/pagination#22

Merged
ines merged 2 commits intoexplosion:mainfrom
magdaaniol:fix/pagination
Dec 24, 2024
Merged

Fix/pagination#22
ines merged 2 commits intoexplosion:mainfrom
magdaaniol:fix/pagination

Conversation

@magdaaniol
Copy link
Contributor

Docling paginates documents starting from 1. spacy-layout is adding one to page_no attribute of the document layout, which potentially results in mismatched pagination between document layout and span layouts.
In the case of one page pdfs this would lead to a run time Key Error as the the spans are being assigned to page_no 1, while the document would only have page_no 2.

@ines
Copy link
Member

ines commented Dec 24, 2024

Thanks, I think this might have actually been a regression I introduced in a recent PR switching from where the page numbers where sourced from.

@ines ines merged commit 4168b64 into explosion:main Dec 24, 2024
1 check passed
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.

2 participants