1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:27:35 +00:00

LibPDF: Initial work on parsing xref streams

Since PDF version 1.5, a document may omit the xref table in favor of
a new kind of xref stream object. This is used to reference so-called
"compressed" objects that are part of an object stream.

With this patch we are able to parse this new kind of xref object, but
we'll have to implement object streams to use them correctly.
This commit is contained in:
Julian Offenhäuser 2022-08-15 12:04:59 +02:00 committed by Sam Atkins
parent 4887aacec7
commit f9beff7b5e
4 changed files with 108 additions and 4 deletions

View file

@ -82,6 +82,7 @@ private:
PDFErrorOr<void> initialize_hint_tables();
PDFErrorOr<PageOffsetHintTable> parse_page_offset_hint_table(ReadonlyBytes hint_stream_bytes);
Vector<PageOffsetHintTableEntry> parse_all_page_offset_hint_table_entries(PageOffsetHintTable const&, ReadonlyBytes hint_stream_bytes);
PDFErrorOr<NonnullRefPtr<XRefTable>> parse_xref_stream();
PDFErrorOr<NonnullRefPtr<XRefTable>> parse_xref_table();
PDFErrorOr<NonnullRefPtr<DictObject>> parse_file_trailer();