andyhutch77 / MvcRazorToPdf

Create pdf documents within an asp .net mvc project by generating your views as normal but returning a PdfActionResult. This converts regular produced razor/html to pdf documents in the browser using the iTextXmlWorker.
125 stars 105 forks source link

RTL and Arabic language support #22

Open devmondo opened 9 years ago

devmondo commented 9 years ago

hi,

this is awesome work, but does it support RTL Languages like Arabic ?

thanks in advanced.

ElanHasson commented 9 years ago

Good question. Please try and let us know. On Oct 21, 2014 6:07 PM, "devmondo" notifications@github.com wrote:

hi,

this is awesome work, but does it support RTL Languages like Arabic ?

thanks in advanced.

— Reply to this email directly or view it on GitHub https://github.com/andyhutch77/MvcRazorToPdf/issues/22.

andyhutch77 commented 9 years ago

@devmondo Could you get this to work?

devmondo commented 9 years ago

Sorry for the late reply, you know when you have a new born, life gets up side down :)

no sadly it does not work, no arabic text is rendered instead this text : ( ) () () :

ElanHasson commented 9 years ago

I'll look at it. Luckily I speak Hebrew. On Oct 28, 2014 4:35 AM, "devmondo" notifications@github.com wrote:

Sorry for the late reply, you know when you have a new born, life gets up side down :)

no sadly it does not work, no arabic text is rendered instead this text : ( ) () () :

— Reply to this email directly or view it on GitHub https://github.com/andyhutch77/MvcRazorToPdf/issues/22#issuecomment-60723662 .

andyhutch77 commented 9 years ago

@devmondo "you know when you have a new born, life gets up side down :)" - This is exactly why I'm not on here as much as I used to be. :+1:

devmondo commented 9 years ago

@ElanHasson thanks a lot man, Hebrew and Arabic share the many concepts right to left and are descendant from one language, hope this will be fixed as i am yet to find a solution that doe, it would be amazing if we can use this awesome library.

@andyhutch77
then we are in the same club mate :)

ElanHasson commented 9 years ago

I tried pasting some RTL text into a view and it was just stripped out.

Check out http://geekswithblogs.net/JaydPage/archive/2011/11/02/using-itextsharp-to-correctly-display-hebrew--arabic-text-right.aspx

Document and writer are exposed, you should be able to set rundirection yourself. Give it a shot..

devmondo commented 9 years ago

@ElanHasson

thanks a lot for the link, but this has problem that if you have English words mixed with Arabic or Hebrew, things will be messed up. you can try it yourself.