Hi,
i load a PDF and iterate throught the pages using this code
Dim syncfPDF As New Syncfusion.Pdf.Parsing.PdfLoadedDocument(File, Password)
syncfPDF.EnableMemoryOptimization = True
Dim loadedPages As Syncfusion.Pdf.Parsing.PdfLoadedPageCollection = syncfPDF.Pages
Dim syncfPage As Syncfusion.Pdf.PdfPageBase
Dim extractedText As String = String.Empty
For i = 0 To loadedPages.Count - 1
syncfPage = loadedPages(i)
extractedText = syncfPage.ExtractText()
Next
While the "for loop" is beeing executed the single pages are loaded into memory, that means images and other objects on the page are loaded into memory.
I suppose images are also uncompressed while loading into memory.
The allocated memory seems not to be disposed by syncfPage = loadedPages(i) when the next page is asigned to syncfPage.
So the memory consumptions increases rapidly only due to iterating through the pages to get the page text.
Is there a way to immediately dispose the page and release memory when it is not used anymore?
F.e. like
For i = 0 To loadedPages.Count - 1
syncfPage = loadedPages(i)
extractedText = syncfPage.ExtractText()
syncfPage.dispose
Next
Thanks.