|
Rank: Newbie Groups: Member
Joined: 6/23/2015 Posts: 3
|
We are using the EO.PDF component (16.0.78) in an ASP.NET application. Recently we've changed the "Load user profile" setting on the Application Pool settings to true (which causes IIS to create an User profile and have seperate registry keys and temp folders). Since this change we see these folders showing up in the Temp folder of this specific user (C:\Users\<name of the application pool>\AppData\Local): eo.webbrowser.cache.16.0.78.0.2.1 eo.webbrowser.cache.16.0.78.0.2.2 eo.webbrowser.cache.16.0.78.0.2.3 ... eo.webbrowser.cache.16.0.78.0.2.48 Each folder contains several files, up to 25-30 MB each. These folders are never cleaned up however, so the Temp folder increases in size a lot. When we had the Load User Profile setting switched off, we did not see these Temp folder somewhere else, so I've got 2 questions: 1) Why does changing the setting on the application pool result in these temp folders? 2) Why doesn't the EO component clean up these folders after usage or after some timeout? We now have a little script to clean up these files, but when we remove the Temp folder itself, EO.PDF runs into an error: Quote:PDFasBytes: Generate: Child process not ready. nWaitResult = 1 Probably it needs to create the Temp folder when it doesn't exists already?! What solution can be applied to cleanup the Temp folder? Edit: I found some solution in another topic, to call " Engine.CleanUpCacheFolders" when the application starts. This application however, runs for several weeks without any restart, so this won't be a solution. Is there something automatically?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
We can not clean up those files automatically because it contains cookie information and sometimes it is desired to keep the cookies. Under normal circumstance there should be only a single folder and it should not be much of a problem. However when you have multiple AppDomains (this is what happens when you have load user profiles turned on), each AppDomain will have their own folder. This is what caused the multiple folders for you. You may want to adjust your script to make sure it does not clean up folders that is currently being used. That should avoid the child process not ready error.
We will look into this and see if we can add an auto clean up flag so that such folders can be automatically cleaned up, or extend CleanUpCacheFolders to clean up the "non-used" folder. We will reply again once we have an update.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 6/14/2013 Posts: 11
|
Hi,
I am facing the same problem. Is there way in EO.PDF to provide a path where these folders needs to be created? The size of these folders are around 45-100 MB for me.
The version in use is 16.1.46.0.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Kunal Choudhary wrote:Hi,
I am facing the same problem. Is there way in EO.PDF to provide a path where these folders needs to be created? The size of these folders are around 45-100 MB for me.
The version in use is 16.1.46.0. Yes. You can set this property: https://www.essentialobjects.com/doc/eo.pdf.htmltopdf.cachefolder.aspxThis is a property that was added very recently. So make sure you update to the latest build first. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 8/24/2007 Posts: 130
|
Hi,
This is a big problem for us!
We recently updated to E.O.Pdf v16.0.84 when we discovered that we are now required to use the E.O Web Browser component. A month later our live site went down due to lack of disk space. These cache files were taking up many gigabytes. Please could you provide me with a solution to this problem. I do not feel that cobbling together a script to do houskeeping on these files is the right way to go.
Regards
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi, You can call this method in your Application_Start: https://www.essentialobjects.com/doc/eo.webengine.engine.cleanupcachefolders_overloads.aspxThis method is specifically for this purpose. You can call it with the "AllVersions" argument. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 8/24/2007 Posts: 130
|
Hi,
This won't help in our situation, as the disk is filling up more frequently than we recycle our application.
Am I right in thinking that there is a way to run eo.pdf in classic mode?
|
|
Rank: Advanced Member Groups: Member
Joined: 8/24/2007 Posts: 130
|
It is also interesting to note that we do not have "load user profile" set. However we are still getting many of these cache files written to windows/temp. Currently, today, I can see 40 directories (eo.webbrowser.cache.16.0.84.0.2.*), each containing a file 'ChromeDWriteFontCache' over 22Mb in size.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi, I am not sure what you meant by "load user profile". Can you explain? The converter will always create temp folders, and it will create more if you have more concurrent tasks. If you need to delete the cache folders more frequently, you can create manage your own AppDomain, run the converter in that domain, unload it and call CleanUpCacheFolder to clean it up on your own schedule. You are correct that you can run EO.Pdf in classic mode. See here for more details: https://www.essentialobjects.com/doc/pdf/install/old_engine.aspxHowever this is only available in the 2016 build. In our up coming 2017 build support for the classic engine will be removed. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 8/24/2007 Posts: 130
|
Hi, I am now attempting to use EO.PDF in classic mode. I have removed EO.WebBrowser.dll and EO.WebEngine.dll from project references, and added EO.Pdf.Classic.dll. I have modified my code as follows:
Code: C#
MemoryStream pdfStream = new MemoryStream();
HtmlToPdf.UseClassicEngine();
HtmlToPdf.Options.OutputArea = new RectangleF(0.5f, 0.5f, 7.5f, 10f);
HtmlToPdf.Options.ZoomLevel = 0.8f;
HtmlToPdf.ConvertHtml(html, pdfStream);
However, I am getting the following error when attempting to run this code: Could not load file or assembly 'EO.WebBrowser, Version=16.0.84.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc' or one of its dependencies. The system cannot find the file specified. I cannot see any reference to EO.WebBrowser in my code. Please advise.
|
|
Rank: Advanced Member Groups: Member
Joined: 8/24/2007 Posts: 130
|
So, it would appear that EO.WebBrowser.dll is required for classic and normal operation. The documentation on UseClassicEngine implies that this is not the case. Maybe consider re-wording this...
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Do you have the stack trace for this error?
|
|
Rank: Advanced Member Groups: Member
Joined: 8/24/2007 Posts: 130
|
Hi,
I have resolved the error by adding EO.WebBrowser.dll back to the project references.
Regards
|
|