Form.ImportFromJson

ImportFromJson(Stream)

Imports the PDF form fields from JSON format provided in the stream.

public IEnumerable<FieldSerializationResult> ImportFromJson(Stream stream)
ParameterTypeDescription
streamStreamThe stream to read the JSON input from.

Return Value

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

Examples

Document document = new Document("PdfDoc.pdf");
FileStream fs = new FileStream("import.json", FileMode.Open, FileAccess.Read);
document.Form.ImportFormFieldsFromJson(fs);
fs.Close();
document.Save();

See Also


ImportFromJson(string)

Imports the PDF form fields from JSON format provided in the specified file.

public IEnumerable<FieldSerializationResult> ImportFromJson(string fileName)
ParameterTypeDescription
fileNameStringThe name of the file to read the JSON input from.

Return Value

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

Examples

Document document = new Document("PdfDoc.pdf");
string jsonPath = "import.json";
document.Form.ImportFormFieldsFromJson(jsonPath);
document.Save();

See Also