0

I need to create pdf document and download it. I use fpdf. On windows it works good , but on Mac I get text on my page without downloading file: http://clip2net.com/s/3NbQ2Ua

My code is:

<form action="/primary_tasks/createReport.php">
....
</form>

createReport.php:

$pdf=new PDF_MC_Table('L','mm','A3');
....
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetWidths(array(80,170,50,50,50));
$pdf->SetFont('Arial','B',10);
$pdf->Cell(0,0,'OPEN TASKS REPORT',0,1,'C');
....
$pdf->Output('file.pdf','D');

How can I fix this bug on the Mac? Thanks.

1 Answers1

0

It looks like you have character encoding issues. Did you ensure you were NOT using windows-1252 encoding anywhere? Everything should be UTF-8.

Check your IDE, files, HTML head meta, DB, and everything is UTF-8!

Have a look here too Detect encoding and make everything UTF-8

delboy1978uk
  • 12,118
  • 2
  • 21
  • 39