mesaglam / alivepdf

Automatically exported from code.google.com/p/alivepdf
0 stars 0 forks source link

Unable to display Japanese Character #28

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. var pdf:PDF = new PDF(...);
2. pdf.addPage();
3. pdf.setFont('arial', '', 12);
4. pdf.addCell(175,20,"遭え",0,1,'L',0);
2. pdf.end();
3. pdf.savePDF(...);

What is the expected output? What do you see instead?
Should display Japanese Text. Nothing is displayed, not even the cell addded.

What version of the product are you using? On what operating system?
AlivePDF 0.1.4, Flex 2.01, WinXP

Please provide any additional information below.

 Hi! first of all, thanks to the author of AlivePDF, you have done a fine
and great library. I have been working on creating PDF over Flex and
stumble to AlivePDF and things work great for me, except for one. 

Once you try adding Japanese Text in creating PDF, nothing gets displayed
even to the extent that the addCell is no longer displayed if it has a
Japanese text in it.

I have checked the CoreFonts.as, FontMetrics.as and some font related .as
files and maybe, its because it was never supported at all i suppose.

I am still currently trying to workout this, but if anyone has a solution,
please post your solution here. Many thanks!

Original issue reported on code.google.com by icewing...@gmail.com on 30 Jan 2008 at 5:52

GoogleCodeExporter commented 9 years ago
i have also tried solution on issue #23 but still it doesnt work. i was 
thinking that
this something about font support issues, yet what i need are PDFs with 
Japanese text
on it.

any idea?

Original comment by icewing...@gmail.com on 30 Jan 2008 at 6:33

GoogleCodeExporter commented 9 years ago
hi icewing,

to display such a font in the PDF, you need to embed the font in the PDF.
Font embedding should be available very soon, please wait a little bit more ! :)

regards,

Thibault

Original comment by thibault.imbert on 31 Jan 2008 at 7:08

GoogleCodeExporter commented 9 years ago
thanks for the reply... ill wait for it. also, ill think of a way to encode 
such 
characters so that the PDF file will not bloat up.

God bless!

Original comment by icewing...@gmail.com on 31 Jan 2008 at 7:31

GoogleCodeExporter commented 9 years ago
Hello, I am trying to use Czech language(latin2,win1250,...) in my PDF, but 
without
any sucess. Is there any progress with support for these characters or for 
embedding
font. It is stopper for my project, so I am open to program it or at least help 
with.

Kind Regards,
Martin Wiso

Original comment by taj...@gmail.com on 31 Jan 2009 at 4:47

GoogleCodeExporter commented 9 years ago
Any news on this issue ?
Chinese characters display as question marks (AlivePDF 0.1.4.8).

Thank you,
Aldo Valenti

Original comment by usa...@gmail.com on 16 Jun 2009 at 7:19

GoogleCodeExporter commented 9 years ago
I am also facing similar issue of ? character being displayed instead of chinese
characters. (AlivePDF 0.1.4.9)

Thanks Ranjita.

Original comment by Ranjeeta...@gmail.com on 29 Oct 2009 at 12:21

GoogleCodeExporter commented 9 years ago
Hi,

Regarding the addCell issue, you can use AlivePDF 0.1.5 RC version, where there 
is a function named escapeIt under class Unicode.as. The method is overridden 
from PDF.as class & also it is protected. To invoke this you have to have a 
public method which return this escapeIt method.

public function returnStr(inputStr:String):String{
    return escapeIt(inputStr);
}

Then create an instance to Unicode class to access this method... You will get 
the expected result.

var myPDF:PDF=new UnicodePDF(Orientation.PORTRAIT, Unit.MM, Size.A4);
var _uniMyPDF:UnicodePDF = new UnicodePDF(Orientation.PORTRAIT, Unit.MM, 
Size.A4);
myPDF.addPage();
 myPDF.textStyle(new RGBColor(0xce0000));

myPDF.setFont(new ArialUnicodeMS(CidInfo.JAPANESE), 11);

myPDF.addCell(175,20,_uniMyPDF.returnStr('遭え'),0,1,'L',0);

Original comment by aka...@gmail.com on 24 Jun 2010 at 1:03

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Do I need to install JAPANESE font in my system to access CidInfo.JAPANESE? My 
Flex SDK shows error for this CidInfo and ArialUnicode as undefined properties..

Original comment by Balashan...@gmail.com on 27 Apr 2011 at 5:22