mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:17:35 +00:00
LibPDF: Make PDF version accessible on Document
This commit is contained in:
parent
9174ffd7e6
commit
ea89053c12
4 changed files with 26 additions and 15 deletions
|
@ -10,6 +10,11 @@
|
|||
|
||||
namespace PDF {
|
||||
|
||||
struct Version {
|
||||
int major { 0 };
|
||||
int minor { 0 };
|
||||
};
|
||||
|
||||
class DocumentParser final : public RefCounted<DocumentParser>
|
||||
, public Parser {
|
||||
public:
|
||||
|
@ -23,7 +28,7 @@ public:
|
|||
[[nodiscard]] ALWAYS_INLINE RefPtr<DictObject> const& trailer() const { return m_xref_table->trailer(); }
|
||||
|
||||
// Parses the header and initializes the xref table and trailer
|
||||
PDFErrorOr<void> initialize();
|
||||
PDFErrorOr<Version> initialize();
|
||||
|
||||
bool can_resolve_references() { return m_xref_table; }
|
||||
|
||||
|
@ -77,7 +82,7 @@ private:
|
|||
friend struct AK::Formatter<PageOffsetHintTable>;
|
||||
friend struct AK::Formatter<PageOffsetHintTableEntry>;
|
||||
|
||||
PDFErrorOr<void> parse_header();
|
||||
PDFErrorOr<Version> parse_header();
|
||||
PDFErrorOr<LinearizationResult> initialize_linearization_dict();
|
||||
PDFErrorOr<void> initialize_linearized_xref_table();
|
||||
PDFErrorOr<void> initialize_non_linearized_xref_table();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue