From b73ce7bcd72a97c780176d9f63681a5415c06422 Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Mon, 19 Jun 2017 16:04:34 -0400 Subject: Fixing metadata not read from linearized file. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This still won't work if the info dict is not on the first page without first calling FPDFAvail_IsFormAvail or FPDFAvail_IsPageAvail, as these are the methods that trigger parsing the rest of the data. Bug: pdfium:664 Change-Id: I0b0193e415a1153dcfb8bfba0e0482da6b6ba53c Reviewed-on: https://pdfium-review.googlesource.com/6610 Commit-Queue: Henrique Nakashima Reviewed-by: dsinclair Reviewed-by: Nicolás Peña --- fpdfsdk/fpdfdoc.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'fpdfsdk') diff --git a/fpdfsdk/fpdfdoc.cpp b/fpdfsdk/fpdfdoc.cpp index 1c445e6f14..7be53a6554 100644 --- a/fpdfsdk/fpdfdoc.cpp +++ b/fpdfsdk/fpdfdoc.cpp @@ -394,6 +394,7 @@ DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT document, CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); if (!pDoc) return 0; + pDoc->LoadDocumentInfo(); CPDF_Dictionary* pInfo = pDoc->GetInfo(); if (!pInfo) return 0; -- cgit v1.2.3