Add some debug output, "debug" make target.

Fix loading of dicts, trailer.
This commit is contained in:
Michael R Sweet
2021-05-04 12:59:10 -04:00
parent 516c6b9ace
commit 59ef6b48ed
7 changed files with 106 additions and 17 deletions

View File

@@ -564,12 +564,15 @@ load_xref(pdfio_file_t *pdf, // I - PDF file
_pdfioFileError(pdf, "Unable to read trailer dictionary.");
return (false);
}
else
else if (trailer.type != PDFIO_VALTYPE_DICT)
{
_pdfioFileError(pdf, "Trailer is not a dictionary.");
return (false);
}
PDFIO_DEBUG("load_xref: Contents of trailer dictionary:\n");
PDFIO_DEBUG_DICT(trailer.value.dict, "load_xref");
if (!pdf->trailer)
{
// Save the trailer dictionary and grab the root (catalog) and info