Skip to content

Commit

Permalink
PDFBOX-4627, PDFBOX-5054: ignore non-stencil images in type3 charproc…
Browse files Browse the repository at this point in the history
…s with d1 or uncolored tiling patterns

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1922858 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Jan 3, 2025
1 parent 8f806dd commit 02d02d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ public void process(Operator operator, List<COSBase> operands) throws IOExceptio
{
return;
}
if (!image.isStencil() && !context.isShouldProcessColorOperators())
{
return;
}
context.drawImage(image);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ public void process(Operator operator, List<COSBase> operands) throws IOExceptio
}
else if (xobject instanceof PDImageXObject)
{
PDImageXObject image = (PDImageXObject)xobject;
PDImageXObject image = (PDImageXObject) xobject;
if (!image.isStencil() && !context.isShouldProcessColorOperators())
{
return;
}
context.drawImage(image);
}
else if (xobject instanceof PDFormXObject)
Expand Down

0 comments on commit 02d02d1

Please sign in to comment.