<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Junk data getting saved in AppData Folder.]]></title><description><![CDATA[<p>There is a concern while generating PDF using jsReport package and C# code. Pdf are getting generated perfectly but i can see some bunch of files getting created on the Server AppData folder. As i was testing this locally i found the files getting created on my local User AppData folder.</p>
<p>I think its not a good pratice to generate files that we don't need. And also these files are not getting cleared. All i want to know is that is there a way to get rid of files that are getting created on AppData floder.</p>
<p>Below is my code config and code shot, jsreport theam can you suggest how to clean up the appdata folder?</p>
<p>Packages details used.</p>
<p>&lt;PropertyGroup&gt;<br />
&lt;TargetFramework&gt;netcoreapp2.0&lt;/TargetFramework&gt;<br />
&lt;/PropertyGroup&gt;</p>
<p>&lt;ItemGroup&gt;<br />
&lt;PackageReference Include=&quot;jsreport.Binary&quot; Version=&quot;1.10.0&quot; /&gt;<br />
&lt;PackageReference Include=&quot;jsreport.Local&quot; Version=&quot;1.1.2&quot; /&gt;<br />
&lt;/ItemGroup&gt;</p>
<p>AppData is getting populated with junk data. See the screen shot below.<br />
<img src="/uploads/files/1521186887187-appdata-folder-resized.png" alt="0_1521186886645_AppData Folder.png" class="img-responsive img-markdown" /></p>
<p>Actual file folder location after running below code</p>
<p>public static async Task&lt;Tuple&lt;byte[], string, string&gt;&gt; GeneratePDF_Local(string tmplContent, string headerTmpl, string footerTmpl, string content, string fileName, string headerHeight, string footerHeight)<br />
{<br />
try<br />
{<br />
var rs = new LocalReporting()<br />
.KillRunningJsReportProcesses()<br />
.UseBinary(JsReportBinary.GetBinary()).AsUtility().Create();<br />
var report = await rs.RenderAsync(new RenderRequest()<br />
{<br />
Template = new Template()<br />
{<br />
Recipe = Recipe.PhantomPdf,<br />
Engine = Engine.Handlebars,<br />
Content = tmplContent,<br />
Phantom = new Phantom<br />
{<br />
Header = headerTmpl,<br />
Footer = footerTmpl,<br />
Orientation = PhantomOrientation.Portrait,<br />
Format = PhantomFormat.A4,<br />
BlockJavaScript = false,<br />
HeaderHeight = headerHeight,<br />
FooterHeight = footerHeight<br />
}<br />
},<br />
Data = content<br />
});<br />
using (var ms = new MemoryStream())<br />
{<br />
await report.Content.CopyToAsync(ms);<br />
var base64OutputFile = ms.ToArray();</p>
<pre><code>                using (FileStream file = new FileStream(&quot;E:\\&quot; + fileName + &quot;.pdf&quot;, FileMode.Create, FileAccess.Write))
                {
                    //byte[] bytes = new byte[file.Length];
                    await file.WriteAsync(base64OutputFile, 0, base64OutputFile.Length);
                }

                await rs.KillAsync();
                return new Tuple&lt;byte[], string, string&gt;(base64OutputFile, fileName, FileFormats.ApplicationPdf);
            }
        }
        catch { throw; }
    }
</code></pre>
<p>Folder on which actual file getting saved see below sceeen</p>
<p><img src="/uploads/files/1521187625256-actual-folder-resized.png" alt="0_1521187624759_Actual Folder.png" class="img-responsive img-markdown" /></p>
]]></description><link>https://forum.jsreport.net/topic/444/junk-data-getting-saved-in-appdata-folder</link><generator>RSS for Node</generator><lastBuildDate>Fri, 15 May 2026 04:28:00 GMT</lastBuildDate><atom:link href="https://forum.jsreport.net/topic/444.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Mar 2018 08:08:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Junk data getting saved in AppData Folder. on Fri, 16 Mar 2018 08:09:39 GMT]]></title><description><![CDATA[<p>There is a concern while generating PDF using jsReport package and C# code. Pdf are getting generated perfectly but i can see some bunch of files getting created on the Server AppData folder. As i was testing this locally i found the files getting created on my local User AppData folder.</p>
<p>I think its not a good pratice to generate files that we don't need. And also these files are not getting cleared. All i want to know is that is there a way to get rid of files that are getting created on AppData floder.</p>
<p>Below is my code config and code shot, jsreport theam can you suggest how to clean up the appdata folder?</p>
<p>Packages details used.</p>
<p>&lt;PropertyGroup&gt;<br />
&lt;TargetFramework&gt;netcoreapp2.0&lt;/TargetFramework&gt;<br />
&lt;/PropertyGroup&gt;</p>
<p>&lt;ItemGroup&gt;<br />
&lt;PackageReference Include=&quot;jsreport.Binary&quot; Version=&quot;1.10.0&quot; /&gt;<br />
&lt;PackageReference Include=&quot;jsreport.Local&quot; Version=&quot;1.1.2&quot; /&gt;<br />
&lt;/ItemGroup&gt;</p>
<p>AppData is getting populated with junk data. See the screen shot below.<br />
<img src="/uploads/files/1521186887187-appdata-folder-resized.png" alt="0_1521186886645_AppData Folder.png" class="img-responsive img-markdown" /></p>
<p>Actual file folder location after running below code</p>
<p>public static async Task&lt;Tuple&lt;byte[], string, string&gt;&gt; GeneratePDF_Local(string tmplContent, string headerTmpl, string footerTmpl, string content, string fileName, string headerHeight, string footerHeight)<br />
{<br />
try<br />
{<br />
var rs = new LocalReporting()<br />
.KillRunningJsReportProcesses()<br />
.UseBinary(JsReportBinary.GetBinary()).AsUtility().Create();<br />
var report = await rs.RenderAsync(new RenderRequest()<br />
{<br />
Template = new Template()<br />
{<br />
Recipe = Recipe.PhantomPdf,<br />
Engine = Engine.Handlebars,<br />
Content = tmplContent,<br />
Phantom = new Phantom<br />
{<br />
Header = headerTmpl,<br />
Footer = footerTmpl,<br />
Orientation = PhantomOrientation.Portrait,<br />
Format = PhantomFormat.A4,<br />
BlockJavaScript = false,<br />
HeaderHeight = headerHeight,<br />
FooterHeight = footerHeight<br />
}<br />
},<br />
Data = content<br />
});<br />
using (var ms = new MemoryStream())<br />
{<br />
await report.Content.CopyToAsync(ms);<br />
var base64OutputFile = ms.ToArray();</p>
<pre><code>                using (FileStream file = new FileStream(&quot;E:\\&quot; + fileName + &quot;.pdf&quot;, FileMode.Create, FileAccess.Write))
                {
                    //byte[] bytes = new byte[file.Length];
                    await file.WriteAsync(base64OutputFile, 0, base64OutputFile.Length);
                }

                await rs.KillAsync();
                return new Tuple&lt;byte[], string, string&gt;(base64OutputFile, fileName, FileFormats.ApplicationPdf);
            }
        }
        catch { throw; }
    }
</code></pre>
<p>Folder on which actual file getting saved see below sceeen</p>
<p><img src="/uploads/files/1521187625256-actual-folder-resized.png" alt="0_1521187624759_Actual Folder.png" class="img-responsive img-markdown" /></p>
]]></description><link>https://forum.jsreport.net/post/2204</link><guid isPermaLink="true">https://forum.jsreport.net/post/2204</guid><dc:creator><![CDATA[explorer855]]></dc:creator><pubDate>Fri, 16 Mar 2018 08:09:39 GMT</pubDate></item><item><title><![CDATA[Reply to Junk data getting saved in AppData Folder. on Invalid Date]]></title><description><![CDATA[<p>These files are cleaned automatically. After 3 minutes or after the next jsreport run.</p>
]]></description><link>https://forum.jsreport.net/post/2205</link><guid isPermaLink="true">https://forum.jsreport.net/post/2205</guid><dc:creator><![CDATA[jan_blaha]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Junk data getting saved in AppData Folder. on Fri, 16 Mar 2018 11:18:39 GMT]]></title><description><![CDATA[<p>Absolutley <a class="plugin-mentions-a" href="https://forum.jsreport.net/uid/2">@jan_blaha</a>. I truly appreciate your patience and effort. But in real time i don't want any Temp files getting created on the server. What I expected that on the go it will do the required HTML to PDF file conversion and save them on desired locations.<br />
I'm using .net core 2.0 web app and trying to generate PDF based on the templates saved on the dbase.</p>
]]></description><link>https://forum.jsreport.net/post/2206</link><guid isPermaLink="true">https://forum.jsreport.net/post/2206</guid><dc:creator><![CDATA[explorer855]]></dc:creator><pubDate>Fri, 16 Mar 2018 11:18:39 GMT</pubDate></item><item><title><![CDATA[Reply to Junk data getting saved in AppData Folder. on Fri, 16 Mar 2018 11:10:37 GMT]]></title><description><![CDATA[<p>After 3 minutes of report creation, still the reports are not getting cleared. You can verify below is the image. These were generated at 12:57 PM and now its way too late. I'm concerned about the server space issue.</p>
<p>The process of creating files on AppData folder and deleting them after 3 mins or after next jsreport run, can't be bypassed?</p>
<p><img src="/uploads/files/1521198549220-upload-55eca598-3327-4914-b553-fa4fe4bf54c3-resized.png" alt="0_1521198548947_upload-55eca598-3327-4914-b553-fa4fe4bf54c3" class="img-responsive img-markdown" /></p>
]]></description><link>https://forum.jsreport.net/post/2207</link><guid isPermaLink="true">https://forum.jsreport.net/post/2207</guid><dc:creator><![CDATA[explorer855]]></dc:creator><pubDate>Fri, 16 Mar 2018 11:10:37 GMT</pubDate></item><item><title><![CDATA[Reply to Junk data getting saved in AppData Folder. on Invalid Date]]></title><description><![CDATA[<p>If the jsreport daemon runs, it should clear temp files. However if you close the application. It is closed as well and doesn't clean.<br />
The next application start (render invoked) the temp files should be cleaned.</p>
<p>We evaluated multiple ways how to work without temp files.<br />
However the pest performing strategy to send html to the pdf renderer, in this case phantomjs, is using temporary files.</p>
]]></description><link>https://forum.jsreport.net/post/2208</link><guid isPermaLink="true">https://forum.jsreport.net/post/2208</guid><dc:creator><![CDATA[jan_blaha]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>