- Update _pdfioFileGets to allow for really long lines where it
doesn't matter if we lose the end of the line.
- Update "startxref" detection at the end of the file.
- Refactor repair logic so that you just get a single WARNING about
the repair (debug messages available for testing)
- Allow whitespace after the "obj" in the object header.
- Make sure to close xref stream on error.
- Update predictor code to support Colors <= 32 (some implementations
set Colors to the number of bytes per record in the xref stream,
which prevents the predictor from doing anything...)
- Allow CR CR in xref table.
- Clear old trailer/root/pages/etc. objects when repairing, update
existing objects that were already found in load_xref.
- Don't set current object in pdfioObjectCreate/OpenStream if the
stream can't be created/opened.
- Add CGATS001-compatible "micro" ICC profile as a standard CMYK color space
(this is the default used by several Adobe applications)
- Add `PDFIO_CS_CGATS001` color space enum.
- Extend `pdfioArrayCreateColorFromStandard` to support CMYK.
- Extend `pdfioFileCreateImageObjFromFile` to support CMYK JPEG files.
- Update `pdfioFileCreatePage` to add default grayscale, RGB, and CMYK color
space resources as needed.
When exploring a PDF, it may be convenient to have the typical
informations delivered by some "Document Properties"---and some more
about the MediaBox(es).
So just add the function to get the ModDate and extend the
pdfioinfo example as an example of what the library do have
and pdfioinfo as a debugging tool also.
Signed-off-by: Thierry LARONDE <tlaronde@kergis.com>
Refactor the pdfioFileCreateXxx functions to use a common (private) function to
handle creating/initializing the pdfio_file_t object and base file objects.
Update unit tests to display the filename for the pdfioFileClose test.
only contain 1 or 2...
Change the implementation of add/find object to use a custom binary insertion
sort algorithm rather than doing a qsort after every addition. This results in
a significant improvement in open speed - from 2371 seconds (about 39.5 minutes)
to 3.1 seconds for one large test file (an ESRI standard).
the Radboud University NL (thanks!)
- Add depth argument to all value read functions that recurse
- Add depth argument to page tree loading code
- Validate xref stream sizes individually to avoid out-of-bounds access to local
xref buffer.