We just installed our new licenses for Cells and Pdf.Kit.
Cells works fine, but Pdf.kit results in error:
System.NotSupportedException: Specified method is not supported. at Aspose.Pdf.Kit.PdfFileEditor.Concatenate(Stream[] inputStreams, Stream outputStream) at LFG.Oasys.BLL.Reporting.PdfReportOutput.CombineReports(ReportInstance reportInstance, ReportDesignAttributes reportAttributes, String reportDir, String reportBuffer, String fileName, String reportOption, Stream outputStream, Boolean zipped) in C:\Projects\Oasys\Dev\TPA3\Source\AMG.Oasys.BLL\Reporting\PdfReportOutput.cs:line 50 at LFG.Oasys.BLL.Reporting.FulfillmentService.GetCombinedReports(ReportInstance reportInstance) in C:\Projects\Oasys\Dev\TPA3\Source\AMG.Oasys.BLL\Reporting\FulfillmentService.cs:line 538 at LFG.Oasys.BLL.Reporting.FulfillmentService.WriteData() in C:\Projects\Oasys\Dev\TPA3\Source\AMG.Oasys.BLL\Reporting\FulfillmentService.cs:line 312
Both license files are installed the same way, through embedded resources.
Can you please share the sample project you’re having problem with? Also, send your license file for Aspose.Pdf.Kit. Please Do Not share the license file on the forums; kindly follow the instructions on this link to send the license file.
We’ll look into the matter and update you accordingly. Regards,
I have tested this issue and found that there is no problem with the license file. In fact, you’re trying to write the output stream directly to the HttpResponse.OutputStream object using the concatenate method, which is not supported. You can use a memory stream to write the output data from the concatenate method and later use this memory stream as you like. I have tested using the following code snippet and it worked perfectly fine.
We have been using the Concatenate Method for a while now (prior to applying the license), and it works well for us. As a matter of fact, during QA testing they created a 22000 page output file with it. Especially with large files like this it helps to stream out, and not use intermediate memory buffers, like temp file streams, to preserve resources.
What puzzles is that the call is not supported with the license applied, but works without the license applied. Is this a technical or a legal issue?
Concatenate takes a System.IO.Stream as parameter which is also the type of HttpResponse.OutputStream.
I just would like to understand the underlying issue a bit better, as it will help us to leverage your product better.
This issue is logged as PDFKITNET-10234 in our issue tracking system. Our development team will be looking into the matter and you’ll be updated as the issue is resolved.
It looks like it is a technical item. The cause of the issue is the fact that HttpResponseStream is not seekable, so until a fix is published for this issue (which will hopefully be later this week), you may use the following workaround:
1) Create MemoryStream and concatenate files to this stream
2) Copy stream contents to http response output stream;