Fix reading PDF files whose trailer is missing a newline (Issue #80)

This commit is contained in:
Michael R Sweet 2024-12-08 19:14:58 -05:00
parent 2ea99597cc
commit d705d7eb5d
No known key found for this signature in database
GPG Key ID: BE67C75EC81F3244
2 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@ v1.4.0 - YYYY-MM-DD
- Added new `pdfioFileCreateNameObj` and `pdfioObjGetName` APIs for creating and
getting name object values (Issue #76)
- Updated documentation (Issue #78)
- Fixed reading of PDF files whose trailer is missing a newline (Issue #80)
v1.3.2 - 2024-08-15

View File

@ -1977,7 +1977,7 @@ load_xref(
{
PDFIO_DEBUG("load_xref: '%s' at offset %lu\n", line, (unsigned long)trailer_offset);
if (!strncmp(line, "trailer", 7) && (!line[7] || isspace(line[7] & 255)))
if (!strncmp(line, "trailer", 7) && (!line[7] || isspace(line[7] & 255) || line[7] == '<'))
{
if (line[7])
{