summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibPDF/Document.h
AgeCommit message (Collapse)Author
2021-06-12LibPDF: Convert to east-const to comply with the recent style changesMatthew Olsson
2021-06-12LibPDF: Parse linearized PDF filesMatthew Olsson
This is a big step, as most PDFs which are downloaded online will be linearized. Pretty much the only difference is that the xref structure is slightly different.
2021-06-12LibPDF: Refine the distinction between the Document and ParserMatthew Olsson
The Parser should hold information relevant for parsing, whereas the Document should hold information relevant for displaying pages. With this in mind, there is no reason for the Document to hold the xref table and trailer. These objects have been moved to the Parser, which allows the Parser to expose less public methods (which will be even more evident once linearized PDFs are supported).
2021-06-12LibPDF: Harden the document/parser against errorsMatthew Olsson
2021-05-25LibPDF: Parse outline structuresMatthew Olsson
2021-05-18LibPDF/PDFViewer: Support rotated pagesMatthew Olsson
2021-05-18Applications: Add a very simple PDFViewerMatthew Olsson
2021-05-18LibPDF: Parse page crop box and user unitsMatthew Olsson
2021-05-10LibPDF: Parse nested Page Tree structuresMatthew Olsson
We now follow nested page tree nodes to find all of the actual page dicts, whereas previously we just assumed the root level page tree node contained all of the page children directly.
2021-05-10LibPDF: Parse page structuresMatthew Olsson
This commit introduces the ability to parse the document catalog dict, as well as the page tree and individual pages. Pages obviously aren't fully parsed, as we won't care about most of the fields until we start actually rendering PDFs. One of the primary benefits of the PDF format is laziness. PDFs are not meant to be parsed all at once, and the same is true for pages. When a Document is constructed, it builds a map of page number to object index, but it does not fetch and parse any of the pages. A page is only parsed when a caller requests that particular page (and is cached going forwards). Additionally, this commit also adds an object_cast function which logs bad casts if DEBUG_PDF is set. Additionally, utility functions were added to ArrayObject and DictObject to get all types of objects from the collections to avoid having to manually cast.
2021-05-10LibPDF: Add a basic parser and Document structureMatthew Olsson
This commit adds a parser as well as the Reader class, which serves as a utility to aid in reading the PDF both forwards and in reverse. The parser currently is capable of reading xref tables, as well as all values. We don't really do anything with any of this information, however.