PeterPanino / thtmlviewer

Automatically exported from code.google.com/p/thtmlviewer
Other
0 stars 0 forks source link

Out of memory error when creating metafile #214

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using THtmlViewer in conjunction with Gnostice's eDocEngine to produce PDF 
documents from HTML documents.

My application creates an HTML document, loads it into THtmlViewer and then 
calls the relevant function in the interface between the THtmlViewer and 
eDocEngine to render the HTML document as a PDF. 

This has worked fine, but we recently had a customer that generated a huge HTML 
document and when they try to render it as a PDF, it falls over with an "out of 
memory" error.

I've contacted Gnostice support and they've looked into it and said that they 
produce a metafile which they then render as a PDF. It is the creation of the 
metafile (in the THtmlViewer source) that is causing the error. 

Am I right in thinking that when the metafile is created, it's spooled into 
memory? If so, that's obviously where the problem is cropping up. The HTML 
document that's causing the problem is around 20MB in size. 

I'm calling the THTMLViewer's loadFromFile to load the HTML document, and then 
the Gnostice components presumably call a method to create a metafile.

Can someone look into this, please?

Original issue reported on code.google.com by gregdar...@gmail.com on 8 Nov 2012 at 11:25

GoogleCodeExporter commented 9 years ago
Greg,

would it be possible to post a (simplified) code example and email a (7-)zipped 
example of such a huge HTML document? 

That would be most helpful for a qualified investigation and answer.

Thanks a lot
OrphanCat

Original comment by OrphanCat on 20 Dec 2012 at 11:31