手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆

TCPDF:php classes for generating pdf documents

首页 > PHP >

手册中介绍PHP生成PDF用的是fpdf,网上也有一些代码其于Fpdf的看起来好象都不错,但是前提是有fpdf。。因此后来都放弃了。
这一个php class我没有试过,但是看上去好象不错,因为:1开源2原生PHP,不用组件(听说,没试过。)主要是看它可以直接把网页生成PDF,因为他支持html,xhtml,css。所以感觉不错

TCPDF is an Open Source PHP class for generating PDF documents.
TCPDF project was started in 2002 and now it is freely used all over the world by millions of people. TCPDF is a Free Libre Open Source Software (FLOSS).

官方的说明也很详细:

Main Features:

  • no external libraries are required for the basic functions;(看来也只是针对基本功能,不过我想应该够了。)
  • all ISO page formats, custom page formats, custom margins and units of measure;
  • UTF-8 Unicode and Right-To-Left languages;
  • TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;
  • Font subsetting;
  • methods to publish some XHTML + CSS code, Javascript and Forms;
  • images, graphic (geometric figures) and transformation methods;
  • native support for JPEG, PNG and SVG images;
  • 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, QR-Code, PDF417;
  • Grayscale, RGB, CMYK, Spot Colors and Transparencies;
  • automatic page header and footer management;
  • document encryption and digital signature certifications;
  • transactions to UNDO commands;
  • PDF annotations, including links, text and file attachments;
  • text rendering modes (fill, stroke and clipping);
  • multiple columns mode;
  • bookmarks and table of content;
  • text hyphenation;
  • automatic page break, line break and text alignments including justification;
  • automatic page numbering and page groups;
  • move and delete pages;
  • page compression.

这里也还有一些例子,有61个之多:

  1. Simple PDF with default Header and Footer: [PHP] [PDF]
  2. Simple PDF without Header and Footer: [PHP] [PDF]
  3. Custom Header and Footer: [PHP] [PDF]
  4. Cell stretching: [PHP] [PDF]
  5. Multicell: [PHP] [PDF]
  6. WriteHTML and RTL support: [PHP] [PDF]
  7. Independent columns with WriteHTMLCell: [PHP] [PDF]
  8. External UTF-8 text file: [PHP] [PDF]
  9. Image: [PHP] [PDF]
  10. Multiple columns: [PHP] [PDF]
  11. Colored Tables: [PHP] [PDF]
  12. Graphic Functions: [PHP] [PDF]
  13. Graphic Transformations: [PHP] [PDF]
  14. Javascript and Forms: [PHP] [PDF]
  15. Bookmarks (Table of Content): [PHP] [PDF]
  16. Document Encryption: [PHP] [PDF]
  17. Independent columns with MultiCell: [PHP] [PDF]
  18. Persian and Arabic language on RTL document: [PHP] [PDF]
  19. Non unicode / Alternative config file: [PHP] [PDF]
  20. Multicell complex alignment: [PHP] [PDF]
  21. writeHTML alignment: [PHP] [PDF]
  22. CMYK colors: [PHP] [PDF]
  23. Page Groups: [PHP] [PDF]
  24. Object Visibility: [PHP] [PDF]
  25. Object Transparency: [PHP] [PDF]
  26. Text Clipping: [PHP] [PDF]
  27. Barcodes: [PHP] [PDF]
  28. Multiple page formats: [PHP] [PDF]
  29. Set PDF viewer display preferences: [PHP] [PDF]
  30. Colour gradients: [PHP] [PDF]
  31. Pie Chart Graphic: [PHP] [PDF]
  32. EPS/AI vectorial image: [PHP] [PDF]
  33. Mixed font types (TrueType Unicode, core, CID-0): [PHP] [PDF]
  34. Clipping masks: [PHP] [PDF]
  35. Line styles with cells and multicells: [PHP] [PDF]
  36. Text Annotations: [PHP] [PDF]
  37. Spot Colors: [PHP] [PDF]
  38. NON-embedded CID-0 CJK font: [PHP] [PDF]
  39. HTML Justification: [PHP] [PDF]
  40. Booklet (double-sided pages): [PHP] [PDF]
  41. File attachment: [PHP] [PDF]
  42. Image with Alpha Channel Transparency: [PHP] [PDF]
  43. Disk caching: [PHP] [PDF]
  44. Move, Copy and delete page: [PHP] [PDF]
  45. Table Of Content with Bookmarks: [PHP] [PDF]
  46. Text hyphenation: [PHP] [PDF]
  47. Transactions and UNDO: [PHP] [PDF]
  48. Table header and rowspan: [PHP] [PDF]
  49. TCPDF methods in HTML: [PHP] [PDF]
  50. 2D Barcode (QR Code): [PHP] [PDF]
  51. Full page background: [PHP] [PDF]
  52. Digital Signature Certification: [PHP] [PDF]
  53. Javascript functions: [PHP] [PDF]
  54. XHTML Form: [PHP] [PDF]
  55. Font Dump: [PHP] [PDF]
  56. Crop Marks and Registration Marks: [PHP] [PDF]
  57. Cell vertical alignments: [PHP] [PDF]
  58. SVG Image: [PHP] [PDF]
  59. Table Of Content with HTML templates: [PHP] [PDF]
  60. Advanced page settings: [PHP] [PDF]
  61. XHTML + CSS: [PHP] [PDF]

可以尝试试用一下吧。




本站采用创作共享版权协议, 要求署名、非商业和保持一致. 本站欢迎任何非商业应用的转载, 但须注明出自"易栈网-膘叔", 保留原始链接, 此外还必须标注原文标题和链接.

Tags: tcpdf, fpdf, pdf

« 上一篇 | 下一篇 »

只显示10条记录相关文章

PDF下载:《High Performance MySQL》 (浏览: 29335, 评论: 0)
使用WPS打印PDF文档 (浏览: 26068, 评论: 0)
利用wps制作6寸PDF电子书 (浏览: 21608, 评论: 0)
鸡肋一般的wps插件:PDF查看 (浏览: 21306, 评论: 0)
昨天所说的power shell的PDF (浏览: 19267, 评论: 0)
Mou生成PDF时颜色偏淡的解决方法 (浏览: 18179, 评论: 0)
pdf to txt (浏览: 17402, 评论: 0)
将网页生成pdf的快速方法 (浏览: 16456, 评论: 1)
TCPDF - Chinese encoding UTF-08 fonts (浏览: 16430, 评论: 0)

发表评论

评论内容 (必填):