mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:44:58 +00:00
pdf: Make --dump-contents print all objects referenced by page too
This commit is contained in:
parent
ca433befa0
commit
e78ea08ed9
1 changed files with 1 additions and 9 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue