summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibPDF/Reader.h
AgeCommit message (Collapse)Author
2023-01-25LibPDF: Add Reader::try_read for easier error propagationRodrigo Tobar
This will allow us to use TRY(reader.try_read) instead of having to verify the result of reader.remaining() before calling read.read().
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-12-03Everywhere: Run clang-formatLinus Groh
2022-11-19LibPDF: Fix off-by-one error in Reader::remaining()Julian Offenhäuser
2022-09-17LibPDF: Move consume and match helper functions to the Reader classJulian Offenhäuser
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2021-11-11Userland: Include Vector.h in a few places to make HeaderCheck happyAli Mohammad Pur
This header was being transitively pulled in, but that no longer happens after 5f7d008791f9e358638283dc2f0d709a601344ff.
2021-11-11Everywhere: Pass AK::ReadonlyBytes by valueAndreas Kling
2021-09-20LibPDF: Add missing headers to Reader.hBen Wiederhake
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-05-25LibPDF: Make Reader::dump_state a bit more readableMatthew Olsson
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.