Print Page | Close Window

Type Bangla (Indic Script) Using QPL

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3175
Printed Date: 21 Sep 24 at 4:22AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Type Bangla (Indic Script) Using QPL
Posted By: m_alam
Subject: Type Bangla (Indic Script) Using QPL
Date Posted: 10 Sep 15 at 1:11PM
I am trying to type/print Bangla Character (indic/complex script). i know qpl support unicode.. i just can't managed to use it.

i have tried below code:

<?php
$fileName = __DIR__ . "/DrawText.pdf";
$qp = new COM("DebenuPDFLibraryAX1113.PDFLibrary");
$validKey = $qp->UnlockKey("");


$text = '; স্কাউট হওয়া ভারি মজা ;   ; তোমাদের  জন্য মুক্তিযুদ্ধের গল্প ;';
$text = mb_convert_encoding($text, 'UTF-16'); // Convert UTF-8 to UTF-16 (with or without it produce same result)

// Add a subset font for the text string
$id = $qp->AddTrueTypeFontFromFile(__DIR__ . "/Fonts/SolaimanLipi.ttf"); //It's a unicode font that has my all my needed characters
$qp->SelectFont($id);
$qp->DrawText(100, 600, $text);

$result = $qp->SaveToFile($fileName);
$qp = null;
?>


it just produce garbage..

any help will highly appreciated...

best regards



Replies:
Posted By: m_alam
Date Posted: 11 Sep 15 at 7:00AM
any help?


Posted By: m_alam
Date Posted: 12 Sep 15 at 10:08AM
hello? anybody?


Posted By: mLipok
Date Posted: 12 Sep 15 at 8:04PM
did you try this functions ?

SetAnsiMode
SetFontEncoding



-------------
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk