Chinaunix首页 | 论坛 | 博客

=.=

  • 博客访问: 135780
  • 博文数量: 50
  • 博客积分: 3000
  • 博客等级: 中校
  • 技术积分: 550
  • 用 户 组: 普通用户
  • 注册时间: 2009-09-25 17:22
文章分类

全部博文(50)

文章存档

2010年(7)

2009年(43)

我的朋友

分类:

2009-09-25 17:52:30

<?php
ini_set('max_execution_time',0);
define('FPDF_FONTPATH','font/');
require('fpdf.php');
require('fpdi.php');

// initiate FPDI

$pdf = new FPDI();
// add a page

$pdf->AddPage();
// set the sourcefile

$pdf->setSourceFile('fk.pdf');
// import page 1

$tplIdx = $pdf->importPage(1);
// use the imported page and place it at point 10,10 with a width of 100 mm

$pdf->useTemplate($tplIdx, 10, 10, 100);

// now write some text above the imported page

$pdf->SetFont('Arial');
$pdf->SetTextColor(255,0,0);
$pdf->SetXY(25, 25);
$pdf->Write(0, "This is just a simple text");

$pdf->Output('newpdf.pdf', 'F');
?>


阅读(2566) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~