Skip to content

Update pdfalto 0.6.1#1513

Open
lfoppiano wants to merge 5 commits into
masterfrom
feature/update-pdfalto-0.6.1
Open

Update pdfalto 0.6.1#1513
lfoppiano wants to merge 5 commits into
masterfrom
feature/update-pdfalto-0.6.1

Conversation

@lfoppiano

@lfoppiano lfoppiano commented Jul 21, 2026

Copy link
Copy Markdown
Member
  • Benchmarks unchanged
  • Performance tests

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 lfoppiano mentioned this pull request Jul 21, 2026
9 tasks
@lfoppiano
lfoppiano marked this pull request as ready for review July 23, 2026 15:03
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.

1 participant