1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:04:59 +00:00

pdf: Make --dump-contents print all objects referenced by page too

This commit is contained in:
Nico Weber 2023-07-12 12:28:52 -04:00 committed by Andreas Kling
parent ca433befa0
commit e78ea08ed9

View file

@ -120,15 +120,7 @@ static PDF::PDFErrorOr<int> 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;
}