iTextSharp.text.pdf.PdfAnnotation.ShallowDuplicate C# (CSharp) Метод

ShallowDuplicate() публичный статический Метод

public static ShallowDuplicate ( PdfAnnotation annot ) : PdfAnnotation
annot PdfAnnotation
Результат PdfAnnotation
        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;
        }