mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:17:44 +00:00
LibPDF: Fix treating not finding the linearized dict as a fatal error
We now try to parse the first indirect value and see if it's the `Linearization Parameter Dictionary`. if it's not, we fallback to reading the xref table from the end of the document
This commit is contained in:
parent
5d4d70355e
commit
1b8f73b6b3
2 changed files with 26 additions and 13 deletions
|
@ -18,6 +18,12 @@ class Document;
|
|||
|
||||
class Parser final : public RefCounted<Parser> {
|
||||
public:
|
||||
enum class LinearizationResult {
|
||||
Error,
|
||||
NotLinearized,
|
||||
Linearized,
|
||||
};
|
||||
|
||||
static Vector<Command> parse_graphics_commands(ReadonlyBytes const&);
|
||||
|
||||
Parser(Badge<Document>, ReadonlyBytes const&);
|
||||
|
@ -83,7 +89,7 @@ private:
|
|||
explicit Parser(ReadonlyBytes const&);
|
||||
|
||||
bool parse_header();
|
||||
bool initialize_linearization_dict();
|
||||
LinearizationResult initialize_linearization_dict();
|
||||
bool initialize_linearized_xref_table();
|
||||
bool initialize_non_linearized_xref_table();
|
||||
bool initialize_hint_tables();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue