Q: Is there any way to save FDFDoc to a byte array or memory stream? I only see the option to save to a file. I have seen references to this in some API documents (Java I think), but not in the .Net library. Was this maybe from an old version? We are looking into saving the FDF files to a database or some non-file system based storage and would like to avoid having to save to disk first if we don’t have to.
The FDFDoc class uses SDFDoc under the hood, and SDFDoc has these methods. The following code will do what you want.
byte fdf_data = fdfDoc.GetSDFDoc().Save(SDFDoc.SaveOptions.e_remove_unused | SDFDoc.SaveOptions.e_compatibility, "%FDF-1.2");