开发者

PHP - Convert HTML web pages to PDF using PHP [duplicate]

This question already has answers here: Closed 12 years ago.

Possible Duplicate:

Convert HTML + CSS to PDF with PHP?

I was开发者_StackOverflow wondering what are some good tutorials or logic on how to convert HTML and XHTML web pages to PDF using PHP?


This is FPDF a PHP written class to create PDFs. The logic is pretty straightforward.

  1. Instantiate the FPDF class
  2. Add a page
  3. Render some content
  4. Output the result.

Edit: Code example here

<?php
require(’fpdf.php’);
$pdf=new FPDF();
$pdf->AddPage();
$pdf->SetFont(’Arial’,'B’,16);
$pdf->Cell(40,10,’Este es un ejemplo de creacion de un documento PDF con PHP’);
$pdf->Output();
?>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜