pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kamal Gera <kamal.g...@nvish.com>
Subject Note able to generate pdf with other than English language such as (Chinese, Japanese, Russian, Korean etc)
Date Tue, 04 Sep 2012 05:49:25 GMT
Hi PDFBox Team,

We are currently evaluating your PDFBox API to generate PDF and merging 
PDF, but now we have to support geo sites like Chinese, Japanese etc. 
When we are generating PDF with these languages characters, it is 
showing junk characters.

Here is the code which we are using :

PDDocument doc = null;
PDPage page = null;
int i = 0;
doc = new PDDocument();
page = new PDPage();
PDPageContentStream content = new PDPageContentStream(doc, page, false, 
PDFont font = PDType1Font.HELVETICA;
int y=650;
String text[] = {"ABCD","dies ist keine Arbeit","hau ez da obra","това 
не е работа","On leur promettait l'enfer. Mais les Bleus n'ont","С мая 
по август на территории Кировской области были ","日々の試合、世界意識を

 サッカー日本代表チーム","多元文化教學 開啟學童大視野"};
for(int p =0;p<text.length;p++)
content.setFont(font, 11);
content.moveTextPositionByAmount(55, y);
y = y-20;


Please revert as soon as possible as it is very critical.

Thanks & Regards

Kamal Gera

View raw message