PHP Classes
elePHPant
Icontem

File: pdf_example/pdf_example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Khaled Al-Shamaa  >  ArGlyphs  >  pdf_example/pdf_example.php  >  Download  
File: pdf_example/pdf_example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: ArGlyphs
Convert Arabic text to Unicode for rendering
Author: By
Last change:
Date: 9 years ago
Size: 608 bytes
 

Contents

Class file image Download
<?php
define
('FPDF_FONTPATH', 'font/');
include_once(
'ufpdf.php');

$pdf = new UFPDF();
$pdf->Open();
$pdf->SetTitle("UFPDF is Cool.");
$pdf->SetAuthor('Steven Wittens');
$pdf->AddFont('trado', '', 'trado.php');
$pdf->AddPage();
$pdf->SetFont('trado', '', 18);

// UTF-8 charset
$text = "بسم الله الرحمن الرحيم";
$pdf->Write(12, "UTF-8:\n".$text."\n\n");

require(
'ArGlyphs.class.php');
$ArabicPDF = new ArGlyphs();
$text = " ";
$text = $ArabicPDF->convert($text);
$pdf->Write(12, "ArGlyphs:\n".$text."\n\n");

$pdf->Close();
$pdf->Output();
?>