PdfAnnotationEditor.ImportAnnotationFromXfdf

ImportAnnotationFromXfdf(string, AnnotationType[])

Imports the specified annotations from XFDF file.

public void ImportAnnotationFromXfdf(string xfdfFile, AnnotationType[] annotType)
ParameterTypeDescription
xfdfFileStringThe input XFDF file.
annotTypeAnnotationType[]The annotations array to be imported.

Examples

PdfAnnotationEditor editor = new PdfAnnotationEditor();
editor.BindPdf("example.pdf");
AnnotationType[] annotTypes = {AnnotationType.Highlight, AnnotationType.Text};
editor.ImportAnnotationFromXfdf("annots.xfdf", annotTypes);
editor.Save("example_out.pdf");

See Also


ImportAnnotationFromXfdf(Stream, AnnotationType[])

Imports the specified annotations from XFDF data stream.

public void ImportAnnotationFromXfdf(Stream xfdfStream, AnnotationType[] annotType)
ParameterTypeDescription
xfdfStreamStreamThe input XFDF data stream.
annotTypeAnnotationType[]The array of annotation types to be imported.

Examples

PdfAnnotationEditor editor = new PdfAnnotationEditor();
editor.BindPdf("example.pdf");
AnnotationType[] annotTypes ={ AnnotationType.Highlight, AnnotationType.Line };
editor.ImportAnnotationFromXfdf(File.OpenRead("annots.xfdf"), annotTypes);
editor.Save("example_out.pdf");

See Also