0

I am trying to use the alivepdf library to create PDFs that include Arabic text. I searched several places, and I could not find if the library supports Arabic. I also tried purepdf, which says it supports Arabic, but found may difficulties in getting that to work. This is how the Arabic text looks in the generated PDF in alivepdf

ÃõÑíÏõ Ãä ÃÏÑõÓ Ýí ÇáÌÇãöÚÉ ÜÜÜÜÜÜÜÜÜÜ ÃÍÕõá Úóáì Úóãá ÌóíøöÏ. [ ÈöÓóÈÈ- áöÃäø- áößí íóÔÊóÑí ÇáßõÊõÈ ÜÜÜÜÜÜÜÜÜÜ ØÇáöÈ. [ ÈöÓóÈÈ- áÃäóøåõ- áöÃäø

My specific question is: does alivePDF support Arabic, and if not what is the alternative. A working example would be appreciated.

Thank you

FlashV8
  • 52
  • 7
  • Have you set font that support Arabic language ,and Embedded that font – kare Nov 14 '15 at 18:26
  • Yes, I used one that does and here is the code I used – FlashV8 Nov 14 '15 at 19:33
  • [Embed( source="assets/fonts/fff.ttf", mimeType="application/octet-stream" )] var times_ttf:Class; [Embed( source="assets/fonts/fff.afm", mimeType="application/octet-stream" )] var times_afm:Class; var f:EmbeddedFont = new EmbeddedFont(new times_ttf() as ByteArray, new times_afm() as ByteArray, CodePage.CP1252); pdf.setFont(f, 16); pdf.addText("This works"); – FlashV8 Nov 14 '15 at 19:35
  • check this link for embedding font in alivepdf : http://alivepdf.bytearray.org/ – kare Nov 14 '15 at 19:58
  • Update: the arabic text showed up finally, but not conjoined. And the direction seemed to go from left to right, instead of right to left – FlashV8 Nov 14 '15 at 20:31
  • by the way, thank you for the link, i checked it out already and was testing it. The code for Arabic seems to be 1256 but that map is missing in the folder that defines codepages. Sounds strange. – FlashV8 Nov 14 '15 at 20:33
  • A quick hint would be to convert your text (tlf text) into a bitmap image and add that image into your pdf to override the right to left broken letters . check this out : http://gravityblast.com/2009/07/19/creating-pdf-with-images-using-flex-and-alivepdf/ – kare Nov 15 '15 at 12:01
  • Thanks! That a nice workaround; it worked! I just wish it would have been straightforward like you pdf something in English. – FlashV8 Nov 16 '15 at 00:56
  • AlivePDF is a dead project and there's no alternative so that's the best you can get. – BotMaster Nov 17 '15 at 13:56
  • That's sad to hear. Thanks for the info, BotMaster! Does that have anything to do with people moving from Flash to HTML5? – FlashV8 Nov 17 '15 at 15:54

0 Answers0