I’m attempting to load an FDF into an Aspose.Kit.Form using the ImportFdf(Stream) function in C#.NET. The FDF is constructed in memory using a MemoryStream. When I call this method, an exception is thrown with the message “Invalid fdf format:fdf head signature is not found!”.
The FDF I’m trying to load has the following first few lines:
%FDF-1.2
1 0 obj <<
/FDF <<
/Fields[
<</T(Id)/V(101)
>>
… and so on.
Adobe Acrobat seems to load this just fine. Why is Aspose.Pdf generating an exception?
Thanks,
Kevin
Hi,
Thank you for considering Aspose.
1. please add "theStream.position = 0;" to set the stream position before using the ImportFdf(theStream) function, and then try again.
2. please attach the two files(both FDF & PDF) here, if setting stream position does not work.
Thanks,
Resetting the stream position worked. Sorry for the simple mistake, but I’m new to .NET.
Thank you!