java


How to write bangla language in iText pdf in android


I have used bangali Language in itext pdf in java but it not work properly My expected output is :প্রযুক্তি শিল্পের দ্রুত
But actual generated output is :
here is my code
try {
Document document = new Document();
String encoding = "Identity-H";
Font fontNormal = FontFactory.getFont(("c:/windows/fonts/arialuni.ttf"), encoding, BaseFont.EMBEDDED, 8, Font.NORMAL);
PdfWriter pdfWriter = PdfWriter.getInstance(document, new FileOutputStream("D:/lockman/mas.pdf"));
pdfWriter.setPageEvent(new PDFGenerator());
document.open();
document.add(header);
Chunk chunkBengali = new Chunk("প্রযুক্তি শিল্পের দ্রুত " + "\n", fontNormal);
PdfPTable table = new PdfPTable(2);
table.addCell("Locale");
table.addCell("Translated Text");
PdfPCell cellBengali = new PdfPCell(new Phrase(chunkBengali));
table.addCell(new PdfPCell(new Phrase(new Chunk("Bengali", fontNormal))));
table.addCell(cellBengali);
document.add(table);
document.add(footer);
document.close();
} catch (FileNotFoundException ex) {
Logger.getLogger(PDFGenerator.class.getName()).log(Level.SEVERE, null, ex);
} catch (DocumentException ex) {
Logger.getLogger(PDFGenerator.class.getName()).log(Level.SEVERE, null, ex);
}
`

Related Links

How to do Selenium Datadriven using excel(or Numbers as called in mac) in Mac machine?
How to keep object variable alive after service onDestroy in Android?
Taking a long string of numbers and removing any zeroes in front of it, then returning that altered string (in Java)
Is it safe to use ThreadLocal with CompletableFuture?
Shared variable in base fragment class, public or private?
Try to add Image to Mysql using Netbeans
Using setDate for User defined class.. Java
how to create a test description with junit4 runListner
JMS with One Copy Per Application in Spring Boot
Null object reference when using adapter, expandable ListView [duplicate]
java netbeans customized print layout
Spring Mongodb - Insert Nested document?
Hibernate : object.org.hibernate.MappingException
Showing how much time a user spent on a certain activity in a textview
Gradle Daemon for Android Studio won't start
java if statement in array for loop

Categories

HOME
wso2-am
testng
openmp
openstack
urbancode
activiti
onedrive
leon
sharepoint-designer
gps
fsm
webrequest
timeout
netflix
serilog
emulator
swiftlint
amazonsellercentral
format-specifiers
firebase-crash-reporting
java-7
shopware
xpages-ssjs
poltergeist
rst2pdf
strncpy
jaxb2
gitignore
iframe-resizer
bosh
language-concepts
fusionpbx
libvpx
ncalc
dynamic-reports
android-mediaprojection
no-www
turbogears
dandelion
setter
magma
r-forge
namecoin
pearson
spring-mongodb
spring-cache
word-vba-mac
infix-notation
google-web-starter-kit
mathematica-frontend
firebaseui
holder.js
markojs
prettytensor
photobucket
sdhc
icu4j
tmuxinator
dundas
web-controls
gwidgets
socketexception
gulp-less
ceil
terminal-services
blending
xamlparseexception
itmstransporter
dmoz
dice
appconkit
enter
coercion
inotifycollectionchanged
pyinotify
imac
filtered-index
nhibernate.search
ext3
avatar
zune
ubuntu-9.04
.net-1.0

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App