[poppler] poppler/Gfx.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Oct 18 16:01:42 UTC 2021


 poppler/Gfx.cc |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 24d0445aa4bf0795aff955dbaf1b585f090d3d2b
Author: Albert Astals Cid <aacid at kde.org>
Date:   Mon Oct 18 17:51:37 2021 +0200

    Support Type3 charprocs having Resources dicts
    
    Doesn't seem to be standard but Adobe supports it so...
    
    Fixes #1150

diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 12b8ecd7..38088059 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -3915,6 +3915,10 @@ void Gfx::doShowText(const GooString *s)
                     pushResources(resDict);
                 }
                 if (charProc.isStream()) {
+                    Object charProcResourcesObj = charProc.streamGetDict()->lookup("Resources");
+                    if (charProcResourcesObj.isDict()) {
+                        pushResources(charProcResourcesObj.getDict());
+                    }
                     std::set<int>::iterator charProcDrawingIt;
                     bool displayCharProc = true;
                     if (refNum != -1) {
@@ -3934,6 +3938,9 @@ void Gfx::doShowText(const GooString *s)
                             charProcDrawing.erase(charProcDrawingIt);
                         }
                     }
+                    if (charProcResourcesObj.isDict()) {
+                        popResources();
+                    }
                 } else {
                     error(errSyntaxError, getPos(), "Missing or bad Type3 CharProc entry");
                 }


More information about the poppler mailing list