DataFormat
12 Sep 20251 minute to read
Public Enum to define export or import data format.
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Sets export data format as JSON type to annotation export settings
let settings: PdfAnnotationExportSettings = new PdfAnnotationExportSettings();
settings.dataFormat = DataFormat.json;
// Export annotations to JSON format
let json: Uint8Array = document.exportAnnotations(settings);
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();-
fdf- Specifies the intent ofFDF. -
json- Specifies the intent ofJSON. -
xfdf- Specifies the intent ofXFDF. -
xml- Specifies the intent ofXML.