mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:47:45 +00:00
LibPDF: Parse linearized PDF files
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.
This commit is contained in:
parent
be1be47613
commit
e23bfd7252
8 changed files with 270 additions and 45 deletions
|
@ -124,11 +124,17 @@ public:
|
|||
|
||||
[[nodiscard]] ALWAYS_INLINE const HashMap<FlyString, Value>& map() const { return m_map; }
|
||||
|
||||
ALWAYS_INLINE bool contains(const FlyString& key) const { return m_map.contains(key); }
|
||||
template<typename... Args>
|
||||
bool contains(Args&&... keys) const { return (m_map.contains(keys) && ...); }
|
||||
|
||||
ALWAYS_INLINE Optional<Value> get(const FlyString& key) const { return m_map.get(key); }
|
||||
|
||||
Value get_value(const FlyString& key) const { return get(key).value(); }
|
||||
Value get_value(const FlyString& key) const
|
||||
{
|
||||
auto value = get(key);
|
||||
VERIFY(value.has_value());
|
||||
return value.value();
|
||||
}
|
||||
|
||||
NonnullRefPtr<Object> get_object(Document*, const FlyString& key) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue