Class PdfAnnotationExportSettings
Class that represents the annotation export settings.
Inheritance
System.Object
PdfAnnotationExportSettings
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
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 | Description |
---|---|
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 | Description |
---|---|
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 | Description |
---|---|
System.Boolean |
Remarks
The ExportAppearance is applicable only for FDF and XFDF formats and 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)