PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

direction rtl
https://forum.pdfsharp.net/viewtopic.php?f=2&t=2121
Page 1 of 1

Author:  miriaml [ Mon Aug 27, 2012 5:45 pm ]
Post subject:  direction rtl

Hello,
I'm trying to write PDF in Hebrew,
I need the option of direction right to left
Is anyone know how to do it?

Author:  Thomas Hoevel [ Tue Aug 28, 2012 8:39 am ]
Post subject:  Re: direction rtl

Hi!

See here:
viewtopic.php?p=2441#p2441

Author:  miriaml [ Tue Aug 28, 2012 9:34 am ]
Post subject:  Re: direction rtl

Thanks for the reply
Has anyone already tried and managed to get direction right to left

Author:  Thomas Hoevel [ Tue Aug 28, 2012 9:52 am ]
Post subject:  Re: direction rtl

You can reverse the string and have MigraDoc create a right-aligned paragraph.
I just don't know if this will look correct. It won't look correct if the shape of a character depends on its neighbours (this trick will not work for Arabic characters). It'll probably look correct if the shape of the character does not depend on its neighbours.

Author:  miriaml [ Thu Aug 30, 2012 7:14 am ]
Post subject:  Re: direction rtl

This is what I did and worked very nicely(reverse the order of the letters)
Thank you
By the way - I had to set:

const bool unicode = true;
const PdfFontEmbedding embedding = PdfFontEmbedding.Always;
PdfDocumentRenderer pdfRenderer = new PdfDocumentRenderer(unicode, embedding);


So it will get letters in Hebrew

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/