I just would like to know if there is some way to enhance the performance of the NET 5.0 libraries (PDF-Base and Compression-Base.dll) during the PDF protection with passwords.
I noticed that PDF Signature (with a lot of effects) can be 20x faster than just protecting the same PDF file. Thinking on this, I was wondering if Winforms PDF Libraries has the same performance behavior (I will test it later)
|
We have tried the PDF signature and PDF security in the ASP.NET Core platform. But we regret to let you know that we were unable to face this issue. Could you please provide us the below details, it will helpful for us to provide the precise solution on this?
|
but one thing warned me: the NET 5 libraries do not have the option of saving "per string" but only "per stream". See below:
Winforms:
LoadedDocument.Save("Output.pdf")
NET 5
LoadedDocument.Save(New Filestream("Output.pdf", File.Create, FileMode.Write)
So, I'm not sure if it would be a reason, but I have seen a lot of "stream" codes without the best performance settings, as a buffer set to 4096 bytes and more, which can cause an unnecessary delay of disk operations.
|
As per the PDF specification in the ASP.NET Core platform, a PDF document can be saved only in the stream.
Note: The WinForms and WPF control support in .NET Core 5.0 have been provided. To run this application, please install thesystem.Drawing.Common NuGet package as a dependent package. |
Another question: instead I have to utilize the SAVE method of "LoadedDocument", could I move its contents to an array and save it according to my preferences (eg. using BinaryWriter or something else)? |
You can save the PDF document using Stream in the ASP.NET Core platform and move that content into an array and save it according to your preference. |