Form.ExportToJson

ExportToJson(Stream, ExportFieldsToJsonOptions)

Exports the PDF form fields to JSON format and writes the result to the provided stream.

public IEnumerable<FieldSerializationResult> ExportToJson(Stream stream, 
    ExportFieldsToJsonOptions options = null)
ParameterTypeDescription
streamStreamThe stream to write the JSON output to.
optionsExportFieldsToJsonOptionsOptional settings for exporting the form fields to JSON.

Return Value

A collection of FieldSerializationResult indicating the result of the export operation for each form field.

Examples

Document document = new Document("PdfDoc.pdf");
FileStream fs = new FileStream("export.json", FileMode.Create, FileAccess.Write);
document.Form.ExportFormFieldsToJson(fs);
fs.Close();

See Also


ExportToJson(string, ExportFieldsToJsonOptions)

Exports the PDF form fields to JSON format and writes the result to the specified file.

public IEnumerable<FieldSerializationResult> ExportToJson(string fileName, 
    ExportFieldsToJsonOptions options = null)
ParameterTypeDescription
fileNameStringThe name of the file to write the JSON output to.
optionsExportFieldsToJsonOptionsOptional settings for exporting the form fields to JSON.

Return Value

A collection of FieldSerializationResult indicating the result of the export operation for each form field.

Examples

Document document = new Document("PdfDoc.pdf");
string jsonPath = "export.json";
document.Form..ExportFormFieldsToJson(jsonPath);

See Also