Update pdfalto 0.6.1#1513
Open
lfoppiano wants to merge 5 commits into
Open
Conversation
pdfalto 0.6.1 streams large page DOMs to a scratch file to bound peak memory, and reports new exit codes for it. Two consequences here: - Exit code 5 means the ALTO was written correctly but streaming was disabled mid-run, so peak memory was not bounded. Both execution paths rejected any non-zero exit, so these successful conversions would have been thrown away as PDFALTO_CONVERSION_FAILURE - on exactly the large documents streaming exists to rescue. It is now a logged warning. Codes 4 (write failed) and 98 (allocation failure, previously a SIGABRT) are reported as PDFALTO_CONVERSION_FAILURE rather than falling through to BAD_INPUT_DATA, which blamed the input PDF. - pdfalto picks the scratch file location from $TMPDIR and falls back to /tmp. In a container /tmp is tmpfs, so spilling there leaves peak memory unchanged and risks ENOSPC, defeating the streaming. Both launchers used a bare ProcessBuilder and never set it. They now pass GROBID's configured temp directory (grobid.temp, by default grobid-home/tmp), failing soft back to pdfalto's default. The pdfalto command-line options are unchanged: the new -vectorBoxes, -vectorCoordsOnly and -vectorLimit options all concern vector graphics, which GROBID does not use.
lfoppiano
marked this pull request as ready for review
July 23, 2026 15:03
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.
Uh oh!
There was an error while loading. Please reload this page.