Reputation: 21
I have a php file which creates a PDF using FPDF. My php file does that after reading a few $_POST values, which "determine" what to display. The PDF is a single page, only containing simple text via Cell() and a few PNG images.
The PDF shows different behaviour accross browsers. I didn't find any information regarding this in the documentation. I found the following test-results:
In the above, I mean with download: "Save file as" from the display-view, to distinguish from forced download via Output('foo.pdf', D). The latter is showing inconsistent results too.
What can cause my problems? Which steps can I take to debug any further?
Upvotes: 1
Views: 2158
Reputation: 21
After persistent digging, I found the cause for all trouble:
$pdf->Cell(0,13,' ',0,1);
So writing cells containing a space only seems to be not allowed. Instead, you can write
$pdf->Cell(0,13,'',0,1);
without problems.
Edit: I made the mistake to call Cell() before the first SetFont(). If you have set SetFont() first, a space in Cell() IS allowed. My bad :)
Upvotes: 1