summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--core/fpdfdoc/cpvt_generateap.cpp7
2 files changed, 5 insertions, 3 deletions
diff --git a/AUTHORS b/AUTHORS
index ee6fc932c1..6b7b167576 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -33,6 +33,7 @@ Michael Doppler <m.doppler@gmail.com>
Miklos Vajna <vmiklos@vmiklos.hu>
Nico Weber <thakis@chromium.org>
Peter Kasting <pkasting@chromium.org>
+Ralf Sippl <ralf.sippl@gmail.com>
Raymes Khoury <raymes@chromium.org>
Reid Kleckner <rnk@chromium.org>
Ryan Wiley <wileyrr@gmail.com>
diff --git a/core/fpdfdoc/cpvt_generateap.cpp b/core/fpdfdoc/cpvt_generateap.cpp
index a61a2451af..eb3e22d870 100644
--- a/core/fpdfdoc/cpvt_generateap.cpp
+++ b/core/fpdfdoc/cpvt_generateap.cpp
@@ -470,14 +470,14 @@ std::unique_ptr<CPDF_Dictionary> GenerateExtGStateDict(
const ByteString& sBlendMode) {
auto pGSDict =
pdfium::MakeUnique<CPDF_Dictionary>(pAnnotDict.GetByteStringPool());
- pGSDict->SetNewFor<CPDF_String>("Type", "ExtGState", false);
+ pGSDict->SetNewFor<CPDF_Name>("Type", "ExtGState");
float fOpacity =
pAnnotDict.KeyExist("CA") ? pAnnotDict.GetNumberFor("CA") : 1;
pGSDict->SetNewFor<CPDF_Number>("CA", fOpacity);
pGSDict->SetNewFor<CPDF_Number>("ca", fOpacity);
pGSDict->SetNewFor<CPDF_Boolean>("AIS", false);
- pGSDict->SetNewFor<CPDF_String>("BM", sBlendMode, false);
+ pGSDict->SetNewFor<CPDF_Name>("BM", sBlendMode);
auto pExtGStateDict =
pdfium::MakeUnique<CPDF_Dictionary>(pAnnotDict.GetByteStringPool());
@@ -514,7 +514,8 @@ void GenerateAndSetAPDict(CPDF_Document* pDoc,
CPDF_Dictionary* pStreamDict = pNormalStream->GetDict();
pStreamDict->SetNewFor<CPDF_Number>("FormType", 1);
- pStreamDict->SetNewFor<CPDF_String>("Subtype", "Form", false);
+ pStreamDict->SetNewFor<CPDF_Name>("Type", "XObject");
+ pStreamDict->SetNewFor<CPDF_Name>("Subtype", "Form");
pStreamDict->SetMatrixFor("Matrix", CFX_Matrix());
CFX_FloatRect rect = bIsTextMarkupAnnotation