File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
kernel/src/main/java/com/itextpdf/kernel/pdf/annot Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -414,8 +414,8 @@ public PdfDictionary getPageObject() {
414
414
* @return {@link PdfPage} on which annotation is placed or null if annotation is not placed yet.
415
415
*/
416
416
public PdfPage getPage () {
417
- if ( page == null && getPdfObject (). isIndirect ()) {
418
- PdfIndirectReference annotationIndirectReference = getPdfObject ().getIndirectReference ();
417
+ PdfIndirectReference annotationIndirectReference ;
418
+ if ( page == null && ( annotationIndirectReference = getPdfObject ().getIndirectReference ()) != null ) {
419
419
PdfDocument doc = annotationIndirectReference .getDocument ();
420
420
421
421
PdfDictionary pageDictionary = getPageObject ();
@@ -425,7 +425,7 @@ public PdfPage getPage() {
425
425
for (int i = 1 ; i <= doc .getNumberOfPages (); i ++) {
426
426
PdfPage docPage = doc .getPage (i );
427
427
for (PdfAnnotation annot : docPage .getAnnotations ()) {
428
- if (annot .getPdfObject ().getIndirectReference (). equals ( annotationIndirectReference )) {
428
+ if (annotationIndirectReference . equals ( annot .getPdfObject ().getIndirectReference ())) {
429
429
page = docPage ;
430
430
break ;
431
431
}
You can’t perform that action at this time.
0 commit comments