本文实例讲述了php实现生成PDF文件的方法。分享给大家供大家参考,具体如下:
首先要下载FPDF http://www.fpdf.org/
或者点击此处本站下载。
例子:将下面的文件保存在web根目录,与附件fpdf17处于同一级
<"UTF-8", "gbk", "2015年10月出勤统计表 导出时间: 2015-10-14 市场部3人"), 1, 0, 'C'); $pdf->Ln(); //以上是表头 $pdf->SetFont('GB', '', 8); $pdf->SetLeftMargin(15.0); $pdf->Cell(10, 8, iconv("UTF-8", "gbk", "UID"), 1, 0, 'C'); $pdf->Cell(10, 8, iconv("UTF-8", "gbk", "姓名"), 1, 0, 'C'); $pdf->Cell(10, 8, iconv("UTF-8", "gbk", "部门"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "出勤/天"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "出勤/小时"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "迟到/次"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "迟到/分钟"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "早退/次"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "早退/次"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "早退/分钟"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "缺卡/次"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "地点异常/次"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "账号状态"), 1, 0, 'C'); $pdf->Ln(); $pdf->Cell(10, 8, iconv("UTF-8", "gbk", "10002"), 1, 0, 'C'); $pdf->Cell(10, 8, iconv("UTF-8", "gbk", "市场部"), 1, 0, 'C'); $pdf->Cell(10, 8, iconv("UTF-8", "gbk", "1"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "9.0"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "0"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "0"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "0"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "0"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "0"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "0"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "0"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "0"), 1, 0, 'C'); $pdf->Cell(15, 8, iconv("UTF-8", "gbk", "0"), 1, 0, 'C'); $pdf->Ln(); $pdf->Output(); "_blank" href="//www.jb51.net/Special/59.htm">php文件操作总结》、《php操作office文档技巧总结(包括word,excel,access,ppt)》、《PHP数组(Array)操作技巧大全》、《PHP数据结构与算法教程》、《php程序设计算法总结》、《PHP数学运算技巧总结》及《php字符串(string)用法总结》希望本文所述对大家PHP程序设计有所帮助。
风云阁资源网 Design By www.bgabc.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
风云阁资源网 Design By www.bgabc.com
暂无评论...
更新日志
2024年11月15日
2024年11月15日
- 刘文正《流金三十年》[6N纯银镀膜][低速原抓WAV+CUE]
- 赵传.1994-精挑细选精选集【滚石】【WAV+CUE】
- 郑亚弦.2024-隔壁包厢603(EP)【发现梦想】【FLAC分轨】
- 文章.2004-被遗忘的时光【华博音乐】【WAV+CUE】
- 群星《青葱韶歌》原力计划·毕业季企划合辑[FLAC+分轨][661M]
- 群星《抖烧 DSD》抖音神曲 [WAV分轨][992M]
- 庾澄庆《哈林天堂》索尼音乐[WAV+CUE][1G]
- 英雄联盟全球总决赛多久打一次 全球总决赛举办频率介绍
- 第二届老头杯什么时候开始选人 第二届老头杯选人时间介绍
- 英雄联盟第二届老头杯什么时候开始 老头杯s2赛程时间队伍名单汇总
- AI赋能卓越显示技术共筑数字未来:三星显示器产品矩阵亮相2024进博会
- 技术剖析:天玑9400如何打造移动最强GPU和游戏体验?
- 顶级装备 实力登顶:三星显示器双十一焕新升级最后冲刺
- 陈影《绝色靓声》WAV+CUE
- 龚玥《禅是一枝花(6N纯银SQCD)》原抓WAV+CUE