From f1c72de7794b309c9691c0b02b6100cdde042015 Mon Sep 17 00:00:00 2001 From: Ryan Wiley Date: Thu, 10 Aug 2017 14:04:13 -0500 Subject: Move graphic state operations outside BT/ET operations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: pdfium:857 Change-Id: Ic1fb12459cad79b45466df10a24fe6743377ae14 Reviewed-on: https://pdfium-review.googlesource.com/10612 Reviewed-by: Nicolás Peña Commit-Queue: Nicolás Peña --- core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp') diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp index 18bcbf909d..9153bf4cea 100644 --- a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp +++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp @@ -352,6 +352,7 @@ void CPDF_PageContentGenerator::ProcessDefaultGraphics( // Tj sets the actual text, <####...> is used when specifying charcodes. void CPDF_PageContentGenerator::ProcessText(std::ostringstream* buf, CPDF_TextObject* pTextObj) { + ProcessGraphics(buf, pTextObj); *buf << "BT " << pTextObj->GetTextMatrix() << " Tm "; CPDF_Font* pFont = pTextObj->GetFont(); if (!pFont) @@ -391,7 +392,6 @@ void CPDF_PageContentGenerator::ProcessText(std::ostringstream* buf, if (charcode != CPDF_Font::kInvalidCharCode) pFont->AppendChar(&text, charcode); } - ProcessGraphics(buf, pTextObj); *buf << PDF_EncodeString(text, true) << " Tj ET"; *buf << " Q\n"; } -- cgit v1.2.3