File tree Expand file tree Collapse file tree 1 file changed +2
-18
lines changed
pdfbox/src/main/java/org/apache/pdfbox/multipdf Expand file tree Collapse file tree 1 file changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -957,24 +957,8 @@ private void processAnnotations(PDPage imported) throws IOException
957957 continue ;
958958 }
959959 COSDictionary clonedMarkupDict = annotDictMap .get (annotationMarkup .getCOSObject ());
960- if (clonedMarkupDict != null )
961- {
962- annotation .getCOSObject ().setItem (COSName .PARENT , clonedMarkupDict );
963- }
964- else
965- {
966- // orphan markup (not in annotation list); clone it and fix references
967- clonedMarkupDict = new COSDictionary (annotationMarkup .getCOSObject ());
968- annotDictMap .put (annotationMarkup .getCOSObject (), clonedMarkupDict );
969- PDAnnotationMarkup annotationMarkupClone =
970- (PDAnnotationMarkup ) PDAnnotation .createAnnotation (clonedMarkupDict );
971- annotationMarkupClone .setPopup ((PDAnnotationPopup ) annotation );
972- ((PDAnnotationPopup ) annotation ).setParent (annotationMarkupClone );
973- if (annotationMarkupClone .getPage () != null )
974- {
975- annotationMarkupClone .setPage (imported );
976- }
977- }
960+ // clonedMarkupDict will be null if markup annotation is an orphan (not in annotation list)
961+ annotation .getCOSObject ().setItem (COSName .PARENT , clonedMarkupDict );
978962 }
979963 }
980964 imported .setAnnotations (clonedAnnotations );
You can’t perform that action at this time.
0 commit comments