mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:27:45 +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
1 changed files with 1 additions and 1 deletions
|
@ -260,7 +260,7 @@ PDFErrorOr<Page> Document::get_page(u32 index)
|
||||||
int rotate = 0;
|
int rotate = 0;
|
||||||
auto maybe_rotate = TRY(get_inheritable_value(CommonNames::Rotate, raw_page_object));
|
auto maybe_rotate = TRY(get_inheritable_value(CommonNames::Rotate, raw_page_object));
|
||||||
if (maybe_rotate.has_value()) {
|
if (maybe_rotate.has_value()) {
|
||||||
rotate = maybe_rotate.value().to_int();
|
rotate = TRY(resolve_to<int>(maybe_rotate.value()));
|
||||||
VERIFY(rotate % 90 == 0);
|
VERIFY(rotate % 90 == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue