diff options
Diffstat (limited to 'fpdfsdk/fpdf_view.cpp')
-rw-r--r-- | fpdfsdk/fpdf_view.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fpdfsdk/fpdf_view.cpp b/fpdfsdk/fpdf_view.cpp index 0e76548abf..8aca6fb9f1 100644 --- a/fpdfsdk/fpdf_view.cpp +++ b/fpdfsdk/fpdf_view.cpp @@ -141,12 +141,8 @@ FPDF_DOCUMENT LoadDocumentImpl( return nullptr; } - auto pParser = pdfium::MakeUnique<CPDF_Parser>(); - pParser->SetPassword(password); - - auto pDocument = pdfium::MakeUnique<CPDF_Document>(std::move(pParser)); - CPDF_Parser::Error error = - pDocument->GetParser()->StartParse(pFileAccess, pDocument.get()); + auto pDocument = pdfium::MakeUnique<CPDF_Document>(); + CPDF_Parser::Error error = pDocument->LoadDoc(pFileAccess, password); if (error != CPDF_Parser::SUCCESS) { ProcessParseError(error); return nullptr; |