1. What's exactly the license of FPDF? Are there any usage restrictions?
2. I get the following error when I try to generate a PDF: Some data has already been output, can't send PDF file
ob_end_clean();
3. Accented letters are replaced by some strange characters like é.
$str = iconv('UTF-8', 'windows-1252', $str);
$str = mb_convert_encoding($str, 'windows-1252', 'UTF-8');
4. I try to display the Euro symbol but it doesn't work.
define('EURO', chr(128));
5. I try to display a variable in the Header method but nothing prints.
global
function Header() { global $title; $this->SetFont('Arial', 'B', 15); $this->Cell(0, 10, $title, 1, 1, 'C'); } $title = 'My title';
function Header() { $this->SetFont('Arial', 'B', 15); $this->Cell(0, 10, $this->title, 1, 1, 'C'); } $pdf->title = 'My title';
6. I have defined the Header and Footer methods in my PDF class but nothing shows.
$pdf = new PDF();
7. I can't make line breaks work. I put \n in the string printed by MultiCell but it doesn't work.
8. I use jQuery to generate the PDF but it doesn't show.
9. I draw a frame with very precise dimensions, but when printed I notice some differences.
10. I'd like to use the whole surface of the page, but when printed I always have some margins. How can I get rid of them?
11. How can I put a background in my PDF?
12. How can I set a specific header or footer on the first page?
function Header() { if($this->PageNo()==1) { //First page ... } else { //Other pages ... } }
13. I'd like to use extensions provided by different scripts. How can I combine them?
require('fpdf.php'); class A extends FPDF { ... }
require('fpdf.php'); class B extends FPDF { ... }
require('a.php'); class B extends A { ... }
require('b.php'); class PDF extends B { ... } $pdf = new PDF();
14. How can I open the PDF in a new tab?
15. How can I send the PDF by email?
$mail = new PHPMailer(); ... $doc = $pdf->Output('S'); $mail->AddStringAttachment($doc, 'doc.pdf', 'base64', 'application/pdf'); $mail->Send();
16. What's the limit of the file sizes I can generate with FPDF?
17. Can I modify a PDF with FPDF?
18. I'd like to make a search engine in PHP and index PDF files. Can I do it with FPDF?
19. Can I convert an HTML page to PDF with FPDF?
20. Can I concatenate PDF files with FPDF?
Sorry, an error has occured, Requested page not found!