How do I save FDF data to a stream or buffer?

50 views
Skip to first unread message

Ryan

unread,
Mar 10, 2015, 8:23:20 PM3/10/15
to pdfne...@googlegroups.com
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.

A:
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");


Lukáš Putala

unread,
Nov 26, 2018, 3:49:57 PM11/26/18
to PDFTron PDFNet SDK
Hi, 
please do you have a example in swift ore Obj-c?


Dňa streda, 11. marca 2015 1:23:20 UTC+1 Ryan napísal(-a):

Ryan

unread,
Nov 30, 2018, 12:23:16 PM11/30/18
to PDFTron PDFNet SDK
Reply all
Reply to author
Forward
0 new messages