custom php Template

prettem

Member
Hello,
I am working on custom php templates, all is running fine, but I cannot find how to remove the page numbers and the top and bottom lines on the pdf output.
Can someone give me hint howto remove that please.

best regards
Manuel

About/upgrade​

DaDaBIK™ is a product conceived and developed by Eugenio Tacchini
Copyright © 2001-2022 Eugenio Tacchini
Proudly ❤️ made in Emilia
dadabik.com

Your current DaDaBIK version​

You are using DaDaBIK version 11.6-Elba enterprise, installed on 16.06.2022 (installation code: 1780462288396de6b1), the latest version of DaDaBIK is 11.6-Elba released on 14.06.2022

You are running the latest release of DaDaBIK

In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enteprise to Platinum) please contact us.

System info​

PHP Version: 7.3.27

mysql version: 5.7.33-0ubuntu0.16.04.1

Web server: Apache

Client: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 Safari/537.36 OPR/89.0.4447.83
 

eugenio

Administrator
Staff member
OK. So if you want to customize the default header and footer of the PDF, you have to override the header and footer methods of the TCPDF class. In the DaDaBIK documentation, search for:

public function Footer()

you will see an example.

Best,
 

prettem

Member
Thank you Eugenio, I read the documentation Part with custom Templates Several Times, but it's not clear for me howto remove this lines and Page numbers unfortunately.
 

eugenio

Administrator
Staff member
Line and page numbers are in the default footer provided by TCPDF, if you add your own footer as explained in the documentation, you will override the default footer and not lines / page numbers will appear.

Best,
 

prettem

Member
Thank you for your reply, I am referring to Rechnung-Inland.php and created the Rechnung-Inland_settings.php
my /templates folder contains the following files:

1660935126785.png

the content of Rechnung-Inland_settings.php is:

$pdf_file_name = 'M&Z Rechnung TEST';

class MYPDF extends TCPDF {
public function Footer() {
$this->Cell(40, 10, 'My footer text ');
}
}

But the new created PDF does not reflect the settings. 'My footer text' does not appear, and lines and pages numbers are shown anyway.

best regards
Manuel
 

eugenio

Administrator
Staff member
Hi,
very strange then, is the Rechnung-Inland.php template working (except from what you set in Rechnung-Inland_settings.php)?

Best,
 
Top