We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

AutoFiller bug

After upgrading from an old aspose.pdf (way back to version 4.x) and aspose.pdf.kit set of dlls I am running into a ton of problems with the Aspose.Pdf.Facades namespace objects… I’m really starting to wonder if I’m the only one using them, or trying to use them at least.

Here’s my latest problem, the following code throws a null reference exception on the Save routine:
MemoryStream ms = new MemoryStream(baTemplate);
MemoryStream msOut = new MemoryStream();
myAutoFiller.BindPdf(ms);
myAutoFiller.ImportDataTable(table);
myAutoFiller.Save(msOut);

Stack trace:
at Aspose.Pdf.Facades.PdfFileEditor.‹(Object[] )
at Aspose.Pdf.Facades.PdfFileEditor.Concatenate(Stream[] inputStream, Stream outputStream)
at Aspose.Pdf.Facades.AutoFiller.Save()
at Aspose.Pdf.Facades.AutoFiller.Save(Stream destStream)
at [my code]

I noticed that there is still an obsolete method overload with no parameters (though, the documentation isn’t updated to match: http://www.aspose.com/docs/display/pdfnet/AutoFiller+Class), and also seems to be used internally according to the stack trace. So I change the save line to this:
myAutoFiller.OutputStream = msOut;
myAutoFiller.Save();

Same error with a similar stack trace. Ok, let’s try something else:
MemoryStream[] msOutArray = new MemoryStream[] { new MemoryStream() };
myAutoFiller.OutputStreams = msOutArray;
myAutoFiller.Save();

Well, that saved, but there’s no data in the memory stream… it seemed to have saved to nowhere. Then I notice that the documentation has the output stream set before the inputdatatable so I try:
myAutoFiller.BindPdf(ms);
myAutoFiller.OutputStream = msOut;
myAutoFiller.ImportDataTable(table);
myAutoFiller.Save();

It works! I’m having to use two “obsolete” items (OutputStream and Save with no parameters), but it works. Please open a bug report to resolve this issue so I can use the methods that won’t disappear on me in a future version. Also, you may wish to update the documentation.

Thanks,
-Doug

Bump again. It’s been a week since I posted this with no acknowledgement from the Aspose staff.

Hi there,


We are really sorry for the delayed response. I’ve managed to reproduce the reported issue on my
side and logged the issue in our bug tracking system for further investigation
and resolution, the issue id is PDFNEWNET-35503.
I’ve also linked your request to this issue and you will be notified via this
thread as soon as it is resolved.

Moreover, we are updating the documentation so hopefully it will be rectified soon.

Please feel free to contact us for any further assistance.

Best Regards,

Thank you.

The issues you have found earlier (filed as PDFNEWNET-35503) have been fixed in Aspose.Pdf for .NET 10.0.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.