Memory leak or over-use ?

Memory leak or over-use ?

Forum member · Mar 16, 2007
Hi there, I am still using V3 for a VS2003 solution that we have developed a while ago, and I am being faced with a weird issue. I am linking the PDF 'export' function (DrawToWeb) through a CMS system. The system puts the HTML content of an article into a PDF field. Now when the HTML is properly formatted (i.e: tags and all) it works perfectly. HOWEVER, (tracing the issue), if there is a 'converted or encoded HTML' i.e: &lt or &gt, then suddenly DynamicPDF memory usage goes all the way UP to the max. memory (i.e: consumes all memory) and the system halts. Getting rid of those special characters makes it work like a charm, and I know I should be doing this in my code (to make sure no such characters shows up), but there MUST be a way for DynamicPDF to 'filter them out' or act in any other way than give that weird behaviour !! Best, Sans

Re: Memory leak or over-use ?

Support · Mar 16, 2007
Hello Sans, We are not aware of any such issues when using &lt or &gt as values for the PDF form field. Can you please let us know what exact build of our product are you using? Also are you trying to fill a form field on an existing PDF document? If yes, please post the exact HTML string that you are using to populate the form field and also send over the PDF document to our [^a|mailto:support@cete.com|Support Team^]. Thanks, ceTe Software Support Team

Re: Memory leak or over-use ?

Forum member · Mar 21, 2007
Hello, I am using the latest build (Runtime v. 1.0.3705), Version 3.0.3.0 (coz previous one had issues with .NET Framework 2.0). My solution is VS 2003. THe problem arises not from < or > but from the converted &lt and &gt symbols. If they are converted back to regular < or > then all is fine, the PDF is generated. If not, it goes into the memeory issue. The document being created from the scratch. Actually these are the lines used to add the existing content to the PDF: 'Set ContentText If Not DR("Content") Is DBNull.Value Then ContentText = Server.HTMLDecode("DR("Content")) ArticleText = RemoveHTML(ContentText") Dim ContentBox as New TextAre(ArticleText ....etc) Mypage.elements.add(contentbox) 'Check for overflow Dim OverflowText as string = contentbox.getoverflowtext Do while ..etc (handle overflow) Below is a sample 'troublesome' content: &lt;FONT size=2&gt; &lt;P align=justify&gt;Give a man a fish, he`ll eat for a day. Teach a man to fish, he`ll eat as much as he catches.&lt;/P&gt; &lt;P align=justify&gt;The GFWC Warren Woman`s Club has tried to apply that principal with literacy over the last 5 years, inspiring third graders in Bradley County to `Look it up` with the club`s dictionary project.&lt;/P&gt; &lt;P align=justify&gt;Since 2002, the club has given a dictionary to each third grade student in Bradley County, including an English dictionary and Spanish-toEnglish dictionary for each Hispanic third grade student.&lt;/P&gt; &lt;P align=justify&gt;`The idea is that we are giving them their own personal dictionary,` said Warren Woman`s Club member and GFWC of Arkansas president Clydine Davis. `Me kids have access to Internet, television and all sorts of other means of getting information, but there`s just something special about holding a book, especially one of your own. And there`s also something more to encouraging a child to look a word up for themselves, rather than just tell them what it means.`&lt;/P&gt; &lt;P&gt;GFWC distributed dictionaries earlier this month at Eastside Elementary in Warren, and local project director Mary Lee said the program was well received, as usual, by kids and teachers alike.&lt;/P&gt;&lt;FONT size=2&gt; &lt;P align=justify&gt;`We do this project with third graders because subsequently decided to try and implement it in Bradley County. Davis said the program enjoyed so much success locally that she made it the district project &lt;FONT size=2&gt;for seven clubs in Southeast Arkansas during her 2002-04 tenure as District president.&lt;/P&gt; &lt;P align=justify&gt;As state president, Davis said she planned on taking the show on the road again by making it the GFWC of Arkansas state project.&lt;/P&gt; &lt;P align=justify&gt;`Our goal is to put a dictionary in the hands of every third grader in the state of Arkansas,` Davis said. `I`ve seen here and on the district level how well this project has been received by the students and how gratifying it has been for the members. This is an easy, relatively inexpensive and very important project.`&lt;/P&gt; &lt;P align=justify&gt;The National Dictionary Project spawned from a local project conducted in 1995 by Annie Plummer of Savannah, Ga.&lt;/P&gt; &lt;P align=justify&gt;The project expanded to 10,295 distributed dictionaries in 1999 and in 2004, 830,333 dictionaries were distributed through the project nationwide by women`s clubs, Rotary clubs and other civic organizations.&lt;/P&gt; &lt;P&gt;`Every year we watch this program grow in certain areas, and I think that part of that has to do with communities feeling empowered to affect change and improve education so that the students will grow up better prepared to compete in the global economy,` National Project Director Mary French said. `Dictionaries are so necessary because I think one of the limitations many people have is an (underdeveloped) vocabulary. People need to expand their vocabulary in order to better express themselves, as &lt;FONT size=2&gt;well as understand ideas being shared with them.`&lt;/P&gt; &lt;P align=justify&gt;French said she had stayed in contact with Lee over the years and was proud of how the project had expanded in Warren and in Arkansas.&lt;/P&gt; &lt;P align=justify&gt;`I think it`s wonderful what they are doing there,` French said. I think it is a testament to that program`s persistence and leadership.`&lt;/P&gt; &lt;P align=justify&gt;For more information about the National Dictionary Project or other dictionary projects in the state visit:&lt;/P&gt;&lt;U&gt; &lt;P&gt;www.dictionaryproject.org.&lt;/P&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; --------------------------------------------------------------- The error that we get is: --------------------------------------------------------------- Error ! at System.String.ToCharArray() at ceTe.DynamicPDF.PageElements.TextArea..ctor(String text, Single x, Single y, Single width, Single height, Font font, Single fontSize) at DictionaryProjectCMS.DownloadPDF.BuildPDF()mscorlibException of type 'System.OutOfMemoryException' was thrown. Please contact the web admin to resolve this issue. Help this helps. Ansari

Re: Memory leak or over-use ?

Support · Mar 21, 2007
Hello Ansari, We are unable to recreate the behavior you are having. Can you please send over the text which is returned by the "RemoveHTML" method into the "ArticleText". If we have this ArticleText then we will try to recreate the behavior. You can send it to our [^a|mailto:support@cete.com|Support Team^]. Thanks, ceTe Software Support Team.

Re: Memory leak or over-use ?

Forum member · Mar 21, 2007
Hello there, You are right. I went through the code again and there was a bug in the OverFlowText handling routine, appearently instead of checking for any more overflow text from the NEW page, it was checking for it from the OLD page and then re-creating unlimited new pages for it. Fixed it and now working perfectly, thanks a lot for your prompt support response though. Best, Ansari