PdfAnnotationEditor.ExportAnnotationsXfdf

ExportAnnotationsXfdf(Stream, int, int, string[])

将指定注释类型的内容导出为 XFDF

public void ExportAnnotationsXfdf(Stream xmlOutputStream, int start, int end, string[] annotTypes)
参数类型描述
xmlOutputStreamStream输出的 XFDF 流。
startInt32从文档中导出注释的起始页。
endInt32导出文档注释的结束页。
annotTypesString[]需要导出的注释类型数组。

示例

PdfAnnotationEditor editor = new PdfAnnotationEditor();
editor.BindPdf("example.pdf");
string[] annotTypes = new string[] {"Text", "Highlight"};
using (Stream stream = File.Create("example.xfdf"))
{
    editor.ExportAnnotationsXfdf(stream, 1, 2, annotTypes);
}

另请参见


ExportAnnotationsXfdf(Stream, int, int, AnnotationType[])

将指定注释类型的内容导出为 XFDF

public void ExportAnnotationsXfdf(Stream xmlOutputStream, int start, int end, 
    AnnotationType[] annotTypes)
参数类型描述
xmlOutputStreamStream输出的 XFDF 流。
startInt32从文档中导出注释的起始页。
endInt32导出文档注释的结束页。
annotTypesAnnotationType[]需要导出的注释类型数组。

示例

PdfAnnotationEditor editor = new PdfAnnotationEditor();
editor.BindPdf("example.pdf");
AnnotationType[] annotTypes = new AnnotationType[] {AnnotationType.Text, AnnotationType.Highlight};
using (Stream stream = File.Create("example.xfdf"))
{
    editor.ExportAnnotationsXfdf(stream, 1, 2, annotTypes);
}

另请参见