Print Page | Close Window

GetPageText Funcion Consumes So Much Memory

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3846
Printed Date: 28 Mar 24 at 4:07PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: GetPageText Funcion Consumes So Much Memory
Posted By: SalmaBegum
Subject: GetPageText Funcion Consumes So Much Memory
Date Posted: 17 Sep 20 at 2:37PM
Greetings..

I have a pdf file of size 2.5mb (663 page)..

I tried to get all the page text for my project purpose. On my pc my project/function runs fine but on user pc it failed (crashed), so i tried to debug and found the function GetPageText takes lot of memory.

here is the following code that i used to debug only:


        For iPLoop As Integer = 1 To (oPDF.PageCount)
            oPDF.SelectPage(iPLoop)
            saveText2File(sAPPPath & String.Format("\wtf-{0}.txt", iPLoop), oPDF.GetPageText(7))
        Next


above code you see/ it's only save each page text directly to text file

by the time it finish it takes more than 1.5GB memory while the pdf file is only 2.5mb and all saved text tile together is 700kb (around).

any suggestion? what i am doing wrong here or is it a library bug? no one noticed yet?

thanks in advance

best regards



Replies:
Posted By: Ingo
Date Posted: 17 Sep 20 at 9:46PM
Is there a renderer included in your project and on your pc?
Does this renderer exist on the user pc as well or not?



-------------
Cheers,
Ingo



Posted By: SalmaBegum
Date Posted: 18 Sep 20 at 7:23AM
Originally posted by Ingo Ingo wrote:

Is there a renderer included in your project and on your pc?
Does this renderer exist on the user pc as well or not?



thanks a lot for your reply and sorry for my late reply..

btw.. sir, nope no renderer is used at all only the QPL..

thanks in advance..

best regards


Posted By: SalmaBegum
Date Posted: 20 Sep 20 at 10:03PM
any help please?


Posted By: Ingo
Date Posted: 30 Sep 20 at 2:49PM
try the search here in the forum.
There should be some threads availabe regarding this issue.



-------------
Cheers,
Ingo



Posted By: Ingo
Date Posted: 30 Sep 20 at 2:55PM
You should check where are the differences between your pc-installation and the user-installation.
What about doing an additional test on a second user-installation?
What about using other options instead of option 7 (for example option 0)?
For us here it's like looking into a glass bowl ;-)



-------------
Cheers,
Ingo



Posted By: Sopracenery
Date Posted: 29 Dec 20 at 2:01PM
Hi,

I checked Lib 18.11 with a loop extracting 1025 pages from QuickPDFLibrary1811.pdf and could not find any issues using Option 0, 1 and 7 with GetPageText().
No memory leaks found.

You can see only a difference in CPU consumption. Option 1 and 7 needs 30% CPU while Option 0 needs only 5% in a timer based loop.

But I did not save all the files!
Maybe there is a problem with a lot of unclosed file handles in saveText2File() which consumes more and more memory.

So the issue is probably outside QuickPDF.

Regards,
Martin





Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk