<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Can downloaded pdf reports have more meaningful file names?]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7398&amp;type=atom" />
	<updated>2018-03-12T18:39:35Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7398</id>
		<entry>
			<title type="html"><![CDATA[Re: Can downloaded pdf reports have more meaningful file names?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31104#p31104" />
			<content type="html"><![CDATA[<p>You can change it to whatever you want but remember that easily guessable filenames can be avoided using good entropy as obtains here. Rename it on file download to suit your needs. Consider how the files would stack up when mixed up with similar reports of different companies and / or different fiscal years in the same folder.</p><p>The filename for storage is computed in lines 971-974 in <strong>reporting/includes/pdf_report.inc</strong>:<br /></p><div class="codebox"><pre><code>            // do not use standard filenames or your sensitive company data 
            // are world readable
            $fname = $dir.&#039;/&#039;.random_id().&#039;.pdf&#039;;
            $this-&gt;Output($fname, &#039;F&#039;);</code></pre></div><p>Mail attachments and inline display will bear the file name provided in the 2nd parameter in the &quot;new FrontReport&quot; class instance&#039;s constructor as seen in line 73 of the same file:<br /></p><div class="codebox"><pre><code>    function __construct($title, $filename, $size = &#039;A4&#039;, $fontsize = 9, $orientation = &#039;P&#039;, $margins = NULL, $excelColWidthFactor = NULL)</code></pre></div><p>and instantiated in each <strong>repXXX.php</strong> file.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-03-12T18:39:35Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31104#p31104</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Can downloaded pdf reports have more meaningful file names?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31102#p31102" />
			<content type="html"><![CDATA[<p>Can downloaded pdf reports have more meaningful file names?</p><p>Such as the report title + date/time stamp?<br />Thanks<br />Bruce</p>]]></content>
			<author>
				<name><![CDATA[brucek@pelhamhs.org]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41547</uri>
			</author>
			<updated>2018-03-12T16:29:07Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31102#p31102</id>
		</entry>
</feed>
