Skip to content

Commit

Permalink
PDFBOX-2941: add /PatternType and /ShadingType display in tree, short…
Browse files Browse the repository at this point in the history
…en space before /S

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1921422 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Oct 19, 2024
1 parent 4296f58 commit 5fb3c77
Showing 1 changed file with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ private String toTreePostfix(Object nodeValue)
COSName subtype = dict.getCOSName(COSName.SUBTYPE);
if (subtype != null)
{
sb.append(" /S:").append(subtype.getName());
sb.append(" /S:").append(subtype.getName());
}
}

Expand All @@ -234,7 +234,25 @@ private String toTreePostfix(Object nodeValue)
COSName subtype = dict.getCOSName(COSName.S);
if (subtype != null)
{
sb.append(" /S:").append(subtype.getName());
sb.append(" /S:").append(subtype.getName());
}
}

if (dict.containsKey(COSName.PATTERN_TYPE))
{
int pt = dict.getInt(COSName.PATTERN_TYPE);
if (pt > -1)
{
sb.append(" /PatternType:").append(pt);
}
}

if (dict.containsKey(COSName.SHADING_TYPE))
{
int st = dict.getInt(COSName.SHADING_TYPE);
if (st > -1)
{
sb.append(" /ShadingType:").append(st);
}
}
return sb.toString();
Expand Down

0 comments on commit 5fb3c77

Please sign in to comment.