menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfAnnotationExportSettings - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PdfAnnotationExportSettings

    Class that represents the annotation export settings.

    Inheritance
    System.Object
    PdfAnnotationExportSettings
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Pdf.Parsing
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public class PdfAnnotationExportSettings
    Examples
    //Loads an existing PDF Document
    PdfLoadedDocument lDoc = new PdfLoadedDocument(@"...\...\Input.pdf");
    //Class that represents the annotation export settings.
    PdfAnnotationExportSettings settings = new PdfAnnotationExportSettings();
    PdfLoadedAnnotationType[] annotType = { PdfLoadedAnnotationType.RectangleAnnotation, PdfLoadedAnnotationType.RubberStampAnnotation,PdfLoadedAnnotationType.FreeTextAnnotation };
    //It Specifies the format to export annotation data.
    settings.DataFormat = AnnotationDataFormat.Fdf
    //Set the array of annotation types that needs to be exported.
    settings.AnnotationTypes = annotType;
    //Gets or sets the flag to export the annotations with appearance.
    settings.ExportAppearance = true;
    //Export the annotations to a file with the specified PdfAnnotationExportSettings.
    lDoc.ExportAnnotations("Annotation.FDF", settings);
    //Close the document
    lDoc.Close(true);
    'Loads an existing PDF Document
    Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("...\...\Input.pdf")
    'Class that represents the annotation export settings.
    Dim settings As PdfAnnotationExportSettings = New PdfAnnotationExportSettings()
    'It Specifies the format to export annotation data.
    settings.DataFormat = AnnotationDataFormat.Fdf
     Dim annotType As PdfLoadedAnnotationType() = {PdfLoadedAnnotationType.FreeTextAnnotation, PdfLoadedAnnotationType.CircleAnnotation}
    'Set the array of annotation types that needs to be exported.
    settings.AnnotationTypes = annotType;
    'Gets or sets the flag to export the annotations with appearance.
    settings.ExportAppearance = true;
    'Export the annotations to a file with the specified PdfAnnotationExportSettings.
    lDoc.ExportAnnotations(Annotation.FDF, settings)
    'Close the document
    lDoc.Close(True)

    Constructors

    PdfAnnotationExportSettings()

    Declaration
    public PdfAnnotationExportSettings()

    Properties

    AnnotationTypes

    Set the array of annotation types need to be exported.

    Declaration
    public PdfLoadedAnnotationType[] AnnotationTypes { set; }
    Property Value
    Type
    PdfLoadedAnnotationType[]
    Examples
    //Loads an existing PDF Document
    PdfLoadedDocument lDoc = new PdfLoadedDocument(@"...\...\Input.pdf");
    //Class that represents the annotation export settings.
    PdfAnnotationExportSettings settings = new PdfAnnotationExportSettings();
    PdfLoadedAnnotationType[] annotType = { PdfLoadedAnnotationType.FreeTextAnnotation, PdfLoadedAnnotationType.CircleAnnotation };
    //Set the array of annotation types that needs to be exported.
    settings.AnnotationTypes = annotType;
    //Gets or sets a value that indicates whether to export annotation with appearance. default value is false
    settings.ExportAppearance = true;
    //Export the annotations to a file with the specified PdfAnnotationExportSettings.
    lDoc.ExportAnnotations("Annotation.FDF", settings);
    //Close the document
    lDoc.Close(true);
    'Loads an existing PDF Document
    Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("...\...\Input.pdf")
    'Class that represents the annotation export settings.
    Dim settings As PdfAnnotationExportSettings = New PdfAnnotationExportSettings()
    Dim annotType As PdfLoadedAnnotationType() = {PdfLoadedAnnotationType.FreeTextAnnotation, PdfLoadedAnnotationType.CircleAnnotation}
    'Set the array of annotation types that needs to be exported.
    settings.AnnotationTypes = annotType;
    'Gets or sets a value that indicates whether to export annotation with appearance. default value is false
    settings.ExportAppearance = True
    'Export the annotations to a file with the specified PdfAnnotationExportSettings.
    lDoc.ExportAnnotations(Annotation.FDF, settings)
    'Close the document
    lDoc.Close(True)

    DataFormat

    It Specifies the format to export annotation data.

    Declaration
    public AnnotationDataFormat DataFormat { get; set; }
    Property Value
    Type
    AnnotationDataFormat
    Examples
    //Loads an existing PDF Document
    PdfLoadedDocument lDoc = new PdfLoadedDocument(@"...\...\Input.pdf");
    //Class that represents the annotation export settings.
    PdfAnnotationExportSettings settings = new PdfAnnotationExportSettings();
    //It Specifies the format to export annotation data. 
    settings.DataFormat = AnnotationDataFormat.Fdf
    //Export the annotations to a file with the specified PdfAnnotationExportSettings.
    lDoc.ExportAnnotations("Annotation.FDF", settings);
    //Close the document
    lDoc.Close(true);
    'Loads an existing PDF Document
    Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("...\...\Input.pdf")
    'Class that represents the annotation export settings.
    Dim settings As PdfAnnotationExportSettings = New PdfAnnotationExportSettings()
    'It Specifies the format to export annotation data.
    settings.DataFormat = AnnotationDataFormat.Fdf
    'Export the annotations to a file with the specified PdfAnnotationExportSettings.
    lDoc.ExportAnnotations(Annotation.FDF, settings)
    'Close the document
    lDoc.Close(True)

    ExportAppearance

    Gets or sets the flag to export the annotations with appearance.

    Declaration
    public bool ExportAppearance { get; set; }
    Property Value
    Type
    System.Boolean
    Remarks

    We export appearance only if it is available in document

    Examples
    //Loads an existing PDF Document
    PdfLoadedDocument lDoc = new PdfLoadedDocument(@"...\...\Input.pdf");
    //Class that represents the annotation export settings.
    PdfAnnotationExportSettings settings = new PdfAnnotationExportSettings();
    //Gets or sets the flag to export the annotations with appearance.
    settings.ExportAppearance = true;
    //Export the annotations to a file with the specified PdfAnnotationExportSettings.
    lDoc.ExportAnnotations("Annotation.FDF", settings);
    //Close the document
    lDoc.Close(true);
    'Loads an existing PDF Document
    Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("...\...\Input.pdf")
    'Class that represents the annotation export settings.
    Dim settings As PdfAnnotationExportSettings = New PdfAnnotationExportSettings()
    'Gets or sets the flag to export the annotations with appearance.
    settings.ExportAppearance = True
    'Export the annotations to a file with the specified PdfAnnotationExportSettings.
    lDoc.ExportAnnotations(Annotation.FDF, settings)
    'Close the document
    lDoc.Close(True)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved