Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Mar 09, 2021 6:45 pm

Hello,

We purchased a license and have upgraded from FreeSpire.Office 4.3.1 to Spire.Office 6.2.1. We noticed the FindText method on a PdfPage object has been consuming a lot more memory than before, and it's been maxing out resources on our server.

With v4.3.1, it was causing our app to consume about 1 GB of memory, which is a lot but it wasn't a problem. In this new version, however, when that method is called more than once, it causes our app's memory consumption to go up to around 2GB. Without calling this method, our app's memory consumption sits around 350MB. Is there a reason why it's so high in this new version? I also noticed that it doesn't clear that memory once the PdfDocument object has been closed and disposed of. Is there possibly a memory leak in that function?

Lastly, I noticed that Spire.Office 6.2.1 comes with Spire.Pdf 7.2.6, but you have released Spire.Pdf 7.2.9. How often do you upgrade the Spire.Office pack to include the latest versions of the individual libraries? We are using .NET Core, and pull your libraries from Nuget. Should we be installing both the Office and Pdf packages from Nuget to stay up to do with the latest versions of each?

codyleach
 
Posts: 2
Joined: Fri Apr 26, 2019 6:00 pm

Wed Mar 10, 2021 7:57 am

Hello,

Thanks for your inquiry.

Regarding memory consumption, could you please provide a sample file along with your test code to help us reproduce your issue? If the issue does exist, we will post it to our Dev team for further investigation and optimization. You could send them to us ([email protected]) via email. Thanks in advance.

Our Spire.Office is usually updated when new versions of individual products are released. As the new version of some products has not been released yet, the version of Spire.Office that includes Spire.Pdf 7.2.9 is temporarily unavailable. Sorry for the inconvenience caused. Besides, you only need to install Spire.Office package from NuGet in your project.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Thu Mar 11, 2021 8:34 am

Hello,

Thanks for providing more information via email.
In the latest version of our product, we removed the .NETCore dlls from the NuGet package, which means that if you install our product via NuGet, your project will use the .NETStandard dlls by default.

I tested your project with both our .NETCore dlls and .NETStandard dlls, and I found that when using .NETCore dlls, the memory consumption will be improved a lot. Thus, for your situation, I recommend you can download the latest Spire.PDF v7.2.9 or Spire.Office v6.2.1 from our website, manually reference the .NETCore dlls and then install the following two libraries in your .NET Core App. If there is any question, please feel free to write back.

.NETCoreApp 2.0
System.Drawing.Common (>= 4.5.0)
System.Text.Encoding.CodePages (>= 4.5.0)
.NETCoreApp 3.0
System.Drawing.Common (>= 4.7.0)
System.Text.Encoding.CodePages (>= 4.7.0)

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Thu Mar 11, 2021 6:04 pm

Thanks for the reply. It does seem to help the memory issue. I will use this approach, and see what it does on our server once we get it deployed.

codyleach
 
Posts: 2
Joined: Fri Apr 26, 2019 6:00 pm

Fri Mar 12, 2021 6:53 am

OK, looking forward to your test result.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Fri Mar 19, 2021 7:25 am

Hello,

Greetings from E-iceblue!
Has your issue been resolved? Any feedback will be greatly appreciated.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Return to Spire.PDF

cron