diff options
Diffstat (limited to 'fpdfsdk/fpdf_view.cpp')
-rw-r--r-- | fpdfsdk/fpdf_view.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fpdfsdk/fpdf_view.cpp b/fpdfsdk/fpdf_view.cpp index af9117579d..9af0ca4755 100644 --- a/fpdfsdk/fpdf_view.cpp +++ b/fpdfsdk/fpdf_view.cpp @@ -354,8 +354,7 @@ FPDF_EXPORT FPDF_PAGE FPDF_CALLCONV FPDF_LoadPage(FPDF_DOCUMENT document, if (!pDict) return nullptr; - auto pPage = pdfium::MakeRetain<CPDF_Page>(pDoc, pDict, true); - pPage->ParseContent(); + RetainPtr<CPDF_Page> pPage = pDoc->GetOrCreatePDFPage(pDict); return FPDFPageFromUnderlying(pPage.Leak()); #endif // PDF_ENABLE_XFA } @@ -962,7 +961,7 @@ FPDF_EXPORT int FPDF_CALLCONV FPDF_GetPageSizeByIndex(FPDF_DOCUMENT document, if (!pDict) return false; - auto page = pdfium::MakeRetain<CPDF_Page>(pDoc, pDict, true); + RetainPtr<CPDF_Page> page = pDoc->GetOrCreatePDFPage(pDict); *width = page->GetPageWidth(); *height = page->GetPageHeight(); return true; |