Skip to content

Commit

Permalink
fix dictionary casting for issue LibrePDF#729
Browse files Browse the repository at this point in the history
  • Loading branch information
koenvb authored May 13, 2022
1 parent 5f54a79 commit 9c4a05f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openpdf/src/main/java/com/lowagie/text/pdf/PdfWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -2489,7 +2489,7 @@ private void addASEvent(PdfName event, PdfName category) {
PdfArray arr = new PdfArray();
for (PdfOCG o : documentOCG) {
PdfLayer layer = (PdfLayer) o;
PdfDictionary usage = (PdfDictionary) layer.get(PdfName.USAGE);
PdfDictionary usage = layer.getAsDict(PdfName.USAGE);
if (usage != null && usage.get(category) != null)
arr.add(layer.getRef());
}
Expand Down

0 comments on commit 9c4a05f

Please sign in to comment.