PdfAnnotationEditor.ImportAnnotationFromXfdf
ImportAnnotationFromXfdf(string, AnnotationType[])
从 XFDF 文件导入指定的注释。
public void ImportAnnotationFromXfdf(string xfdfFile, AnnotationType[] annotType)
| 参数 | 类型 | 描述 |
|---|---|---|
| xfdfFile | 字符串 | 输入的 XFDF 文件。 |
| annotType | AnnotationType[] | 要导入的注释数组。 |
示例
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 数据流。 |
| annotType | AnnotationType[] | 要导入的注释类型数组。 |
示例
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");