PdfAnnotationEditor.ImportAnnotationFromXfdf

ImportAnnotationFromXfdf(string, AnnotationType[])

从 XFDF 文件导入指定的注释。

public void ImportAnnotationFromXfdf(string xfdfFile, AnnotationType[] annotType)
参数类型描述
xfdfFile字符串输入的 XFDF 文件。
annotTypeAnnotationType[]要导入的注释数组。

示例

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

另请参阅


ImportAnnotationFromXfdf(Stream, AnnotationType[])

从 XFDF 数据流导入指定的注释。

public void ImportAnnotationFromXfdf(Stream xfdfStream, AnnotationType[] annotType)
参数类型描述
xfdfStream输入的 XFDF 数据流。
annotTypeAnnotationType[]要导入的注释类型数组。

示例

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");

另请参阅