惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Privacy International News Feed
V
Vulnerabilities – Threatpost
The Last Watchdog
The Last Watchdog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
O
OpenAI News
T
Threat Research - Cisco Blogs
WordPress大学
WordPress大学
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
P
Palo Alto Networks Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Help Net Security
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
T
The Blog of Author Tim Ferriss
H
Hackread – Cybersecurity News, Data Breaches, AI and More
S
Securelist
Vercel News
Vercel News
S
Security Affairs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
B
Blog RSS Feed
云风的 BLOG
云风的 BLOG
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Blog — PlanetScale
Blog — PlanetScale
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI
博客园_首页
Attack and Defense Labs
Attack and Defense Labs
G
Google Developers Blog
T
Tor Project blog
Project Zero
Project Zero
腾讯CDC
Schneier on Security
Schneier on Security
月光博客
月光博客
N
Netflix TechBlog - Medium
AWS News Blog
AWS News Blog
L
LINUX DO - 最新话题
P
Proofpoint News Feed
博客园 - 司徒正美
A
About on SuperTechFans
Latest news
Latest news
Scott Helme
Scott Helme
Hacker News: Ask HN
Hacker News: Ask HN
T
Threatpost
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
CERT Recently Published Vulnerability Notes
Google DeepMind News
Google DeepMind News
博客园 - 聂微东

博客园 - N/A2011

Managing Hierarchical Data in MySQL php soapclient with wsse 转贴 MySQL Multiple Result Procs in PHP 转贴 jQuery Datepicker by Example 转贴 Using MySQL Stored Procedures with PHP mysql/mysqli/pdo open office (java) ant + emma + junit Copy all files recursively from one folder to another RecursiveFileFinder 转贴: 怎样找第一份工作 PerformanceCounter in .net Trace in .net Logger in .net 转贴: 傅立叶级数(Fourier Series) 推导 CAS in .net Encrypting and Decrypting in .net Access Control List in .net User and Data Security in .net Unmanaged code in .net
php generate pdf
N/A2011 · 2010-04-28 · via 博客园 - N/A2011

代码

<?php
require_once(dirname(__FILE__)."/lib/fpdf/fpdf.php");
require_once(dirname(__FILE__)."/lib/fpdi/fpdi.php");
$filename = "file/template.pdf";
$pdf=new FPDI('P','mm','Legal');//page one
$pdf->AddPage();
$pdf->setSourceFile($filename);
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx);
//default autonumber
$pdf->SetFont('Arial','B',12);
$pdf->Cell(135);
$pdf->Cell(50,12,'sss',0,0,'L');
//A1
$pdf->Ln(26);
$pdf->SetFont('Arial','B',10);
$pdf->Cell(47);
$pdf->Cell(50,12,'xxxx',0,0,'L');
//A2,A3,A4,A5
$pdf->Ln(4);
$pdf->SetFont('Arial','B',10);
$pdf->Cell(47);
$pdf->Cell(50,12,'xxxx',0,0,'L');
//B1
$pdf->Ln(16);
$pdf->SetFont('Arial','B',10);
$pdf->Cell(47);
$pdf->Cell(50,12,'xxxxx',0,0,'L');
//B2,B3,B4,B5
$pdf->Ln(7);
$pdf->SetFont('Arial','B',10);
$pdf->Cell(47);
$pdf->Cell(50,12,'xxxxxx',0,0,'L');
//B6
$pdf->Ln(5);
$pdf->SetFont('Arial','B',10);
$pdf->Cell(47);
$pdf->Cell(50,12,'xxxxx',0,0,'L');//page two
$pdf->AddPage();
$pdf->setSourceFile($filename);
$tplIdx = $pdf->importPage(2);
$pdf->useTemplate($tplIdx);
//default autonumber
$pdf->SetFont('Arial','B',9);
$pdf->Cell(152);
$pdf->Cell(50,9,'xxxx',0,0,'L');header("Content-Transfer-Encoding", "binary");
header('Cache-Control: maxage=3600'); //Adjust maxage appropriately
header('Pragma: public');
$pdf->Output();
//$pdf->Output('document.pdf', 'D');
?>