<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Custom PDF Header]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=10709&amp;type=atom" />
	<updated>2026-02-08T10:14:30Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=10709</id>
		<entry>
			<title type="html"><![CDATA[Custom PDF Header]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=43829#p43829" />
			<content type="html"><![CDATA[<p>I can see there is a function in pdf_report.inc that includes some Customer Header Template from<br />/reporting/forms folder</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><p>I am not sure How to use this If I add some custom header page in my module. Any help, ideas, sample?</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2026-02-08T10:14:30Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=43829#p43829</id>
		</entry>
</feed>
