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

LibPDF: Give Parser a reference to the Document

The Parser will need to call resolve_to on certain values.
This commit is contained in:
Matthew Olsson 2021-05-10 10:33:32 -07:00 committed by Andreas Kling
parent 6808cd1915
commit 2f0a2865f2
2 changed files with 5 additions and 0 deletions

View file

@ -12,6 +12,8 @@ namespace PDF {
Document::Document(const ReadonlyBytes& bytes)
: m_parser(Parser({}, bytes))
{
m_parser.set_document(this);
VERIFY(m_parser.perform_validation());
auto [xref_table, trailer] = m_parser.parse_last_xref_table_and_trailer();