pdf file creation in php

Posted by pavun_cool on Stack Overflow See other posts from Stack Overflow or by pavun_cool
Published on 2010-03-16T07:14:34Z Indexed on 2010/03/16 7:16 UTC
Read the original article Hit count: 272

Filed under:
|

Actually I have used following code , for creating the simple pdf file . It executed fine in the browsers. But I am not able to get the pdf file . But it gives me some output when I am running the code in CLI . my doubt is , where I need specify pdf file name ( creation file ) .

<?php
require('fpdf.php');

$pdf=new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World!');
$pdf->Output();
?>

CLI output: 2 0 obj << /Type /Page /Parent 1 0 R /Contents 3 0 R >> endobj 3 0 obj << /Length 4 0 R >> stream 2.834646 0 0 2.834646 0 841.9 cm 2 J 0.2 w BT /F1 5.64 Tf ET BT 11 -16.692 Td (Hello World!) Tj ET

© Stack Overflow or respective owner

Related posts about php

Related posts about pdf