mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
LibPDF: Tolerate page rotation being an indirect object
Needed e.g. for 0000196.pdf in 0000.zip in the pdfa dataset.
This commit is contained in:
parent
8b806183f6
commit
a65d8ff2ea
Notes:
sideshowbarker
2024-07-17 18:49:10 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/a65d8ff2ea Pull-request: https://github.com/SerenityOS/serenity/pull/21584
1 changed files with 1 additions and 1 deletions
|
@ -260,7 +260,7 @@ PDFErrorOr<Page> Document::get_page(u32 index)
|
|||
int rotate = 0;
|
||||
auto maybe_rotate = TRY(get_inheritable_value(CommonNames::Rotate, raw_page_object));
|
||||
if (maybe_rotate.has_value()) {
|
||||
rotate = maybe_rotate.value().to_int();
|
||||
rotate = TRY(resolve_to<int>(maybe_rotate.value()));
|
||||
VERIFY(rotate % 90 == 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue