ladybird/Userland/Libraries/LibPDF
Julian Offenhäuser d1bc89e30b LibPDF: Try to repair XRef tables with broken indices
An XRef table usually starts with an object number of zero. While it
could technically start at any other number, this is a tell-tale sign
of a broken table.

For the "broken" documents I encountered, this always meant that some
objects must have been removed from the start of the table, without
updating the following indices. When this is the case, the document is
not able to be read normally.

However, most other PDF parsers seem to know of this quirk and fix the
XRef table automatically.

Likewise, we now check for this exact case, and if it matches up with
what we expect, we update the XRef table such that all object numbers
match the actual objects found in the file again.
2022-11-25 22:44:47 +01:00
..
Fonts LibPDF: Override Type 1 character mappings by encoding in font dict 2022-11-25 22:44:47 +01:00
CMakeLists.txt Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
ColorSpace.cpp LibPDF: Derive alternate ICC color space from the number of components 2022-11-19 15:42:08 +01:00
ColorSpace.h LibPDF: Fix mismatched class/struct declaration 2022-03-31 18:10:45 +02:00
CommonNames.cpp LibPDF: Add Type0 and TrueType fonts 2022-03-31 18:10:45 +02:00
CommonNames.h LibPDF: Implement png predictor decoding for flate filter 2022-11-19 15:42:08 +01:00
Document.cpp LibPDF: Allow page objects to inherit the MediaBox and Resources entries 2022-10-16 17:44:54 +02:00
Document.h LibPDF: Allow page objects to inherit the MediaBox and Resources entries 2022-10-16 17:44:54 +02:00
DocumentParser.cpp LibPDF: Try to repair XRef tables with broken indices 2022-11-25 22:44:47 +01:00
DocumentParser.h LibPDF: Try to repair XRef tables with broken indices 2022-11-25 22:44:47 +01:00
Encoding.cpp LibPDF: Add very basic support for Adobe Type 1 font rendering 2022-10-16 17:44:54 +02:00
Encoding.h LibPDF: Add very basic support for Adobe Type 1 font rendering 2022-10-16 17:44:54 +02:00
Encryption.cpp Everywhere: Fix a bunch of typos 2022-05-29 15:22:00 +02:00
Encryption.h LibPDF: Add implementation of the Standard security handler 2022-03-29 02:52:57 +02:00
Error.h LibPDF: Add Type0 and TrueType fonts 2022-03-31 18:10:45 +02:00
Filter.cpp LibPDF: Implement png predictor decoding for flate filter 2022-11-19 15:42:08 +01:00
Filter.h LibPDF: Implement png predictor decoding for flate filter 2022-11-19 15:42:08 +01:00
Forward.h LibPDF: Get rid of PlainText/Encoded StreamObject 2022-03-29 02:52:57 +02:00
Object.h LibPDF: Break inclusion cycle by removing unnecessary include 2022-09-17 04:00:54 +00:00
ObjectDerivatives.cpp Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
ObjectDerivatives.h LibPDF: Support parsing page tree nodes that are in object streams 2022-09-17 10:07:14 +01:00
Operator.h Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
Parser.cpp LibPDF: Parse integer numbers with atoi() instead of strtof() 2022-11-19 15:42:08 +01:00
Parser.h LibPDF: Disallow parsing indirect values as operands 2022-09-17 10:07:14 +01:00
Reader.cpp LibPDF: Parse floating point numbers that omit a leading zero correctly 2022-10-16 17:44:54 +02:00
Reader.h LibPDF: Fix off-by-one error in Reader::remaining() 2022-11-19 15:42:08 +01:00
Reference.h
Renderer.cpp LibPDF: Move all font handling to Type1Font and TrueTypeFont classes 2022-11-25 22:44:47 +01:00
Renderer.h LibPDF: Move all font handling to Type1Font and TrueTypeFont classes 2022-11-25 22:44:47 +01:00
Value.cpp
Value.h
XRefTable.h LibPDF: Try to repair XRef tables with broken indices 2022-11-25 22:44:47 +01:00