We are evaluating Aspose.Pdf (.NET) product and the following problem prevents us from buying a license.
I found the reason myself. First of all, it has nothing to do with WCF or account application is running under. However, reason is much more mysterious. It seems that Aspose.Pdf looks for variable with name “TempFolder” in application configuration file (variable from section in app.config file). IF this variable points to a folder on a NON-system drive (so, usually, NOT C:\ drive), any attempt to save pdf document to a stream will result in the exception above. Any attempt to save document using Pdf.Save(String) overload (which is intended to save to a file), will result in zero-length pdf file. It took me many hours to figure out that mysterious and non-documented behavior. To reproduce the problem, perform the following simple actions:
Hi Evgeny,
Thanks you very much for sharing the details. While testing the scenario with the latest version of Aspose.Pdf for .NET 9.4.0 and VS2012,
we have managed to reproduce the reported issue and logged it with high priority in our bug
tracking system as PDFNEWNET-37208 for further investigation and
resolution. We will notify you via this thread as soon as it is resolved.
We are sorry for the inconvenience caused.
Best Regards,
The issues you have found earlier (filed as PDFNEWNET-37208) have been fixed in Aspose.Pdf for .NET 9.9.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Hi Evgeny,
Thanks for your patience. As stated above, your reported issue has been fixed. Please use the new generator code for creating new PDF documents as follows; it will resolve the issue.
Document doc = new Document();
using (var fs = new FileStream("output.pdf", FileMode.Create))
{
doc.Save(fs);
}
Please feel free to contact us for any further assistance.
Best Regards,