The message may be followed by this indication:
(output started at script.php:X)
which gives you exactly the script and line number responsible for the output. If you don't see it, try adding this line at the very beginning of your script:
ob_end_clean();
$str = iconv('UTF-8', 'windows-1252', $str);
Or with mbstring:
$str = mb_convert_encoding($str, 'windows-1252', 'UTF-8');
define('EURO', chr(128));
function Header() < global $title; $this->SetFont('Arial', 'B', 15); $this->Cell(0, 10, $title, 1, 1, 'C'); > $title = 'My title';
Alternatively, you can use an object property:
function Header() < $this->SetFont('Arial', 'B', 15); $this->Cell(0, 10, $this->title, 1, 1, 'C'); > $pdf->title = 'My title';
$pdf = new PDF();
function Header() < if($this->PageNo()==1) < //First page . >else < //Other pages . >>
require('fpdf.php'); class A extends FPDFand B in b.php:
require('fpdf.php'); class B extends FPDFthen make B extend A:
require('a.php'); class B extends Aand make your own class extend B:
require('b.php'); class PDF extends B < . >$pdf = new PDF();
$mail = new PHPMailer(); . $doc = $pdf->Output('S'); $mail->AddStringAttachment($doc, 'doc.pdf', 'base64', 'application/pdf'); $mail->Send();
- There is usually a maximum memory size allocated to PHP scripts. For very big documents, especially with images, the limit may be reached (the file being built in memory). The parameter is configured in the php.ini file.
- The maximum execution time allocated to scripts defaults to 30 seconds. This limit can of course be easily reached. It is configured in php.ini and may be altered dynamically with set_time_limit().