예제 #1
0
 public static PdfAnnotation shallowDuplicate(PdfAnnotation annot) {
   PdfAnnotation dup;
   if (annot.isForm()) {
     dup = new PdfFormField(annot.writer);
     PdfFormField dupField = (PdfFormField) dup;
     PdfFormField srcField = (PdfFormField) annot;
     dupField.parent = srcField.parent;
     dupField.kids = srcField.kids;
   } else dup = new PdfAnnotation(annot.writer, null);
   dup.merge(annot);
   dup.form = annot.form;
   dup.annotation = annot.annotation;
   dup.templates = annot.templates;
   return dup;
 }
예제 #2
0
 public void addKid(PdfFormField field) {
   field.parent = this;
   if (kids == null) kids = new ArrayList<PdfFormField>();
   kids.add(field);
 }