diff --git a/viewer/viewer-awt/src/main/java/org/icepdf/ri/common/print/PrintHelperImpl.java b/viewer/viewer-awt/src/main/java/org/icepdf/ri/common/print/PrintHelperImpl.java index f1165ffbc..be36c3214 100644 --- a/viewer/viewer-awt/src/main/java/org/icepdf/ri/common/print/PrintHelperImpl.java +++ b/viewer/viewer-awt/src/main/java/org/icepdf/ri/common/print/PrintHelperImpl.java @@ -183,11 +183,14 @@ public int print(Graphics printGraphics, PageFormat pageFormat, int pageIndex) { Dimension dim = pageDim.toDimension(); Rectangle2D.Float rect = new Rectangle2D.Float(0, 0, dim.width, dim.height); List annotations = currentPage.getAnnotations(); - for (Annotation annot : annotations) { - Rectangle2D.union( - rect, - annot.calculatePageSpaceRectangle(currentPage, Page.BOUNDARY_MEDIABOX, rotation, zoomFactor), - rect); + if (annotations != null) { + for (Annotation annot : annotations) { + Rectangle2D.union( + rect, + annot.calculatePageSpaceRectangle(currentPage, Page.BOUNDARY_MEDIABOX, rotation, + zoomFactor), + rect); + } } // Get location of imageable area from PageFormat object