Load Template XLS To PDF / Border error !

Topics: Developer Forum
Jun 16, 2010 at 5:15 PM

Hi,

First of all many thaks for this library ! It's wonderfull !

I try do mak this :

1. Load a template in XLS format

2. Populate it

3. Convert it to PDF

My code is :

$objPHPExcel = PHPExcel_IOFactory::load( $this->template_xls . 'template2.xls');

// POPULATE
// ...

$objWriter = new PHPExcel_Writer_PDF($objPHPExcel);

$filename = "ApercuFacture" . "Test" . ".pdf";
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");;
header("Content-Disposition: attachment;filename=$filename ");
header("Content-Transfer-Encoding: binary ");
$objWriter->save("php://output");

My problem comes with the fact that invisible line of the table appear on the PDF file. It's not happened with the generation of XLS file.

I have little table in my template so I can't use setShowGridlines(false);.

Any idea ? Thanks !