I'm having performance issues when trying to convert PDF to PDF with watermark (PDF with 4 pages takes something like 15 min)
I upgraded the Aspose.PDF .Net from version 5.2.1.0 to version 8.3.0.0
I'm not using a memory stream, I'm using a custom stream, and I noticed that the Read calls thousand times when using BindPDF and something like one hundred thousand times when using "pdfFileSecurity.SetPrivilege" or using "PdfFileInfo" with the stream.
I checked the old Aspose version and I saw that the Read function of the Stream called just a few times.
Can you please help me with this issue?
Here is two examples of how we use it in c#:
(1)
Aspose.Pdf.Facades.PdfConverter converter = new Aspose.Pdf.Facades.PdfConverter();
converter.BindPdf(MyStream);
(2)
PdfFileSecurity pdfFileSecurity = new PdfFileSecurity(myStream, outputMemoryStream);
We are sorry for the inconvenience. I’m afraid, I’m unable to notice performance issue while testing the scenario with Aspose.Pdf for .NET 8.3, Pdf document is being rendered in couple of seconds. We will appreciate if you please share your complete sample code here. So we will replicate the issue at our end and will share information accordingly.
The pdf been converted in a few seconds if you are using MemortStream.
We are using custom Stream - the Read function in my custom stream takes a few milliseconds (something like 30-50 milliseconds) multiply it with 100,000 calls it’s a lot of time.
Thanks for your feedback. I’ve used your custom MyStream Class to loading PDF document and saved output to disk. But I’m unable to replicate the issue, so requested you for the sample code to replicate the issue. Please share the sample code, it will help us to replicate the issue and further investigation for correction.