Method ExportAsFDF

Namespace TallComponents.PDF.JavaScript.Scripting
Class Doc

Override this method to implement custom exportAsFDF behavior.

For security reasons, this method will not write the form data to any file by default.

In order to provide an implementation that adheres to the PDF specification, one should override this method and present a file selector if no path is given, and save the data to the selected file. If a path is given, one may directly write the data to the specified file, although one should take care that this does not introduce a security problem. System.Windows.Forms.SaveFileDialog dialog = new System.Windows.Forms.SaveFileDialog(); if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { using (System.IO.FileStream stream = new System.IO.FileStream(dialog.FileName, System.IO.FileMode.CreateNew)) { formData.Write(stream); } }

This method will get invoked when the javascript exportAsFDF method gets called. This javascript function has a number of parameters that specify which data should be exported. At the moment, we ignore all parameters except cPath and bAllFields.

Syntax

protected internal  Void  ExportAsFDF( String  path FdfFormData  formData )

Returns

Void

Parameters


String path
optional, device-independent path to the FDF file. The default is null.

FdfFormData formData
The fdf data that need to be exported.