pdf

function untuk konversi data menjadi PDF

includes/function/pdf.php

pdf_cleaner

dipanggil oleh pdf_write untuk membersihkan tag HTML sebelum dimasukkan ke dokumen PDF

pdf_cleaner( $text );

pdf_date

menampilkan footer untuk PDF hasil buatan dari function pdf_write

pdf_date( $param );

pdf_decode

digunakan oleh function pdf_cleaner untuk meng-convert HTML table menjadi tag table pada PDF

pdf_decode( $string );

pdf_export

function yang dipanggil ketika ingin membuat file pdf

pdf_export($config, $title = 'new-file');

Contoh penggunaan:
$config = array(
	'content' => array(
		array(
			'text'  => 'Judul PDF yang ingin dibuat',
			'style' => 'title'
			),
		array(
			'columns' => array(
				array(
					'text'  => 'Danang Widiantoro',
					'style' => 'author'
					),
				array(
					'text'  => 'May 4th, 2016 03:11:39',
					'style' => 'created'
					)
				),
			),
		array(
			'image' => 'sampleImage.jpg',
			'style' => 'image',
			'width' => 520
			),
		array(
			'text'  => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.',
			'style' => 'content'
			),
		array(
			'text'  => 'Terakhir disunting : May 21st, 2016 16:46:2',
			'style' => 'modified'
			),
		array(
			'text'  => 'Tags : Article, Berita, Information',
			'style' => 'category'
			),
		),
	'styles' => array(
		'title'    => array(
			'fontSize' => 18,
			'bold'     => true,
			'margin'   => [0,0,0,20]
			),
		'author'   => array(
			'italic' => true
			),
		'created'  => array(
			'italic'    => true,
			'alignment' => 'right'
			),
		'image'    => array(
			'alignment' => 'center',
			'margin'    => [0,0,0,10]
			),
		'content'  => array(
			),
		'modified' => array(
			'italic'    => true,
			'alignment' => 'right',
			'margin'    => [0,10,0,0]
			),
		'category' => array(
			'italic'    => true,
			'margin'    => [0,20,0,0]
			),
		),
	'pageSize'        => 'a4',
	'pageOrientation' => 'portrait'
	);
_func('pdf');
pdf_export($config, $config['title']);

pdf_write

membuat file PDF secara sederhana

pdf_write($param, $paper = 'a4', $layout = 'portrait');

contoh variable $param
$param = array(
 'title'    => 'Judul Document',
  'content'  => 'Isi document',
  'created'  => 'Tanggal pembuatan',
 'category' => 'String kumpulan category dari content',
 'author'   => 'Nama penulis',
  'modified' => 'Tanggal terakhir di edit'
 );