Search code examples
pdfexporttcpdffpdf

FPDF - How to remove a vertical line in the generated file


I am trying to generate a PDF file from an html content using FPDF

            $this->pdf->AddPage();          
            $html = "Hello World";
            $footer = "Footer";
            $this->pdf->WriteHTML($html);
            $this->pdf->SetXY(1,255);
            $this->pdf->MultiCell(208, 20, $footer, 0, "C", false, 0, '','',true,0,true,true,0,'B',false);

The generated file contains a vertical line on the top of the page (above Hello World). After few tests I found out that it's added by AddPage(), I get that it's sort of a seperator of pages but I don't want to keep it and didn't find how to remove it.

Also, it doesn't seem like a common issue so I don't know if I'm missing something...


Solution

  • I think you are using TCPDF instead of FPDF. So just disable the automated page header via the setPrintHeader() method.