1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

LibPDF: Allow pages with no specified contents

The contents object may be omitted as per spec, which will just leave
the page blank.
This commit is contained in:
Julian Offenhäuser 2023-03-24 22:12:31 +01:00 committed by Andrew Kaster
parent fde990ead8
commit b90a794d78
3 changed files with 7 additions and 2 deletions

View file

@ -85,6 +85,9 @@ Renderer::Renderer(RefPtr<Document> document, Page const& page, RefPtr<Gfx::Bitm
PDFErrorsOr<void> Renderer::render()
{
if (m_page.contents.is_null())
return {};
// Use our own vector, as the /Content can be an array with multiple
// streams which gets concatenated
// FIXME: Text operators are supposed to only have effects on the current