From e78ea08ed97bade40dc75a360263671772ebfed8 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 12 Jul 2023 12:28:52 -0400 Subject: [PATCH] pdf: Make --dump-contents print all objects referenced by page too --- Userland/Utilities/pdf.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Userland/Utilities/pdf.cpp b/Userland/Utilities/pdf.cpp index a09933107d..8e35020fca 100644 --- a/Userland/Utilities/pdf.cpp +++ b/Userland/Utilities/pdf.cpp @@ -120,15 +120,7 @@ static PDF::PDFErrorOr pdf_main(Main::Arguments arguments) int page_index = page_number - 1; if (dump_contents) { - auto page = TRY(document->get_page(page_index)); - auto contents = TRY(page.page_contents(*document)); - for (u8 c : contents.bytes()) { - if (c < 128) - out("{:c}", c); - else - out("\\{:03o}", c); - } - + TRY(document->dump_page(page_index)); return 0; }