<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Update in reporting code]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8216&amp;type=atom" />
	<updated>2020-06-10T14:28:43Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=8216</id>
		<entry>
			<title type="html"><![CDATA[Re: Update in reporting code]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37607#p37607" />
			<content type="html"><![CDATA[<p>Thank you Barbarian!&nbsp; I am using UTF-8 and the font_subsetting reduced the size of the my generated PDF files significantly.&nbsp; The only issues I have had are the margins, landscape cutting off the header, and with the batch check print module.&nbsp; The margins and batch check were an easy fix.&nbsp; I haven&#039;t tried to tackle landscape yet as I don&#039;t use it.&nbsp; IMHO the reduced PDF size makes this very worthwhile.</p>]]></content>
			<author>
				<name><![CDATA[chem75]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20727</uri>
			</author>
			<updated>2020-06-10T14:28:43Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37607#p37607</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Update in reporting code]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35531#p35531" />
			<content type="html"><![CDATA[<p>Given a test today with basic reports and find Margins issue as mentioned here<br /><a href="http://prnt.sc/okysmi">http://prnt.sc/okysmi</a></p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2019-07-28T02:50:33Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35531#p35531</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Update in reporting code]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35226#p35226" />
			<content type="html"><![CDATA[<p>@barbarian, great work. I will test it. I really needed a good reporting from HTML to PDF.</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2019-06-17T06:06:15Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35226#p35226</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Update in reporting code]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35225#p35225" />
			<content type="html"><![CDATA[<p>The source code size is pretty much small. TCPDF is large because it includes font. In my repo, the font files have been removed so it is small now.</p><p>Form folder is used to put custom header.</p><p>In pdf_report.inc</p><div class="codebox"><pre><code>function NewPage() 
    {
        if ($this-&gt;pageNumber==0)
        {
            // check if there is pdf header template for this report
            // and set if it is found
            $tmpl_pdf = find_custom_file(&quot;/reporting/forms/&quot;.$this-&gt;headerTmpl.&quot;.pdf&quot;);
            if ($tmpl_pdf) {
                $this-&gt;tmplSize = $this-&gt;setSourceFile($tmpl_pdf);
            }
        }

        $this-&gt;pageNumber++;
        parent::newPage();

        if ($this-&gt;tmplSize) {
            $this-&gt;row = $this-&gt;pageHeight - $this-&gt;topMargin; // reset row
            $id = $this-&gt;importPage(min($this-&gt;pageNumber, $this-&gt;tmplSize));
            $this-&gt;useTemplate($id);
        }

        // include related php file if any
        $tmpl_php = find_custom_file(&quot;/reporting/forms/&quot;.$this-&gt;headerTmpl.&quot;.php&quot;);
        if ($tmpl_php) {
            include($tmpl_php);
        }

        if (method_exists($this, $this-&gt;headerTmpl))    // draw predefined page layout if any
            $this-&gt;{$this-&gt;headerTmpl}();
    }</code></pre></div>]]></content>
			<author>
				<name><![CDATA[barbarian]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18954</uri>
			</author>
			<updated>2019-06-17T02:59:01Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35225#p35225</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Update in reporting code]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35224#p35224" />
			<content type="html"><![CDATA[<p>Nice work @barbarian. How does the code size compare?</p><p>Can anyone explain what the <strong>reporting/forms</strong> folder is for? We need to update the wiki on this score.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2019-06-17T01:57:19Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35224#p35224</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Update in reporting code]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35223#p35223" />
			<content type="html"><![CDATA[<p>So, I just updated the reporting with latest version of FPDI and TCPDF version 6. I put the updated repo in: https://github.com/barbarian1803/FA_new_reporting</p><p>I haven&#039;t checked all functionality but it seems to work just fine. With latest TCPDF version implemented, maybe there are new features in TCPDF that can be implemented and certainly, we can use HTML for designing the report because TCPDF has supported HTML. Please try it if anyone interested and kindly comment/report any problem or bug. Thank you.</p>]]></content>
			<author>
				<name><![CDATA[barbarian]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18954</uri>
			</author>
			<updated>2019-06-17T01:29:49Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35223#p35223</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Update in reporting code]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35180#p35180" />
			<content type="html"><![CDATA[<p>To avoid code bloat the various libraries are not being used. Also &quot;old&quot; does not mean &quot;bad&quot; and &quot;new&quot; does not have to mean &quot;good&quot;. Users are free to extend the existing classes to suit their needs and submit it for peer review. Native rendering of TCPDF / FPDI makes for smaller PDF files rather than HTML to PDF conversions. Make a separate extension of your library using DOMPDF and the community will be the richer. Make for a simple meta template for reports and have any plugin library render the reports.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2019-06-14T05:01:06Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35180#p35180</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Update in reporting code]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35175#p35175" />
			<content type="html"><![CDATA[<p>Hello,</p><p>Just wondering, when I am modifying report/creating new report, the current library is really uncomfortable to me. Is there any plan to update the library? Maybe using newer version of TCPDF and FPDI because it seems the current FA used is old version. Maybe also using DOMPDF to make report easier with HTML. I believe TCPDF also has capabilities to generate PDF from HTML though. Also for excel, PHPSpreadsheet is an awesome library instead of current Workbook.php used in FA. Any opinion? I am willing to help the development if needed. I have implemented my own reporting library using DOMPDF 5 years ago and it worked amazing.</p>]]></content>
			<author>
				<name><![CDATA[barbarian]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18954</uri>
			</author>
			<updated>2019-06-13T08:24:26Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35175#p35175</id>
		</entry>
</feed>
