Skip to content
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

Fix/pagination #22

Merged
merged 2 commits into from
Dec 24, 2024
Merged

Fix/pagination #22

merged 2 commits into from
Dec 24, 2024

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