Fasilitas yang terdapat di TCPDF tetapi tidak terdapat di FPDF :
- Source code full documented.
- PHP5 class and PHP4 alternative.
- support for UTF-8 Unicode and Right-To-Left languages (including a bidirectional algorithm).
- includes support for backward editing (edit a previous page).
- support for document encryption;
- methods to publish some (x)HTML code including complex tables;
- a large number of graphic (geometric) and transformation functions;
- PDF bookmarks;
- Javascript and forms support (you can also save the forms content);
- supports user rights management so Adobe Reader users can save filled-in copies of forms they complete.
- method to render various barcode formats directly on PDF.
- support for TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts.
- supports custom page formats, margins and units of measure.
- includes methods for page header and footer that could be easily overwritten.
- supports page groups.
- supports clipping masks and stroke and clipping mode for text.
- supports CMYK, Spot Colors and transparency (in addition to Grayscale and RGB modes).
- supports links and annotations.
- Menggunakan TCPDF
Yang wajib anda ketahui dan setting adalah :
- require_once atau include yang mengarah pada modul fpdf.php
- membuat object dengan cara $pengenal=new FPDF();
- tentukan font yang akan anda gunakan dengan cara setFont(’Nama_font’,’Style_font’,ukuran). Style font berupa B untuk bold, I untuk miring dan kosong untuk normal. Parameter ukuran dalam bilangan.
- Minimal file pdf anda harus memiliki 1 page, caranya dengan AddPage()
- Gunakan Output() untuk mengirimkan keluaran dalam bentuk pdf ke browser.
TCPDF Fonts
- courier : Courier
- courierb : Courier Bold
- courierbi : Courier Bold Italic
- courieri : Courier Italic
- helvetica : Helvetica
- helveticab : Helvetica Bold
- helveticabi : Helvetica Bold Italic
- helveticai : Helvetica Italic
- symbol : Symbol
- times : Times New Roman
- timesb : Times New Roman Bold
- timesbi : Times New Roman Bold Italic
- timesi : Times New Roman Italic
- zapfdingbats : Zapf Dingbats
PDF Core (standart) :
Set the Font
Untuk men set font kita tinggal memanggi method SetFont() .
SetFont(string family[,string style[,string size]])
- family
- Courier (fixed-width)
- Helvetica or Arial (synonymous; sans serif)
- Times (serif)
- Symbol (symbolic)
- ZapfDingbats (symbolic)
- style Font style.
- empty string: regular
- B: bold
- I: italic
- U: underline
- size Font size in points. Default value 12
example : $pdf->SetFont(“vera”, “BI”, 20);