diff --git a/Userland/Libraries/LibPDF/Document.cpp b/Userland/Libraries/LibPDF/Document.cpp index aa4cb8da35..6bda120e87 100644 --- a/Userland/Libraries/LibPDF/Document.cpp +++ b/Userland/Libraries/LibPDF/Document.cpp @@ -260,7 +260,7 @@ PDFErrorOr 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(maybe_rotate.value())); VERIFY(rotate % 90 == 0); }