PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Mar 29, 2024 2:00 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: direction rtl
PostPosted: Mon Aug 27, 2012 5:45 pm 
Offline

Joined: Mon Aug 27, 2012 5:36 pm
Posts: 3
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: direction rtl
PostPosted: Tue Aug 28, 2012 8:39 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3095
Location: Cologne, Germany
Hi!

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

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject: Re: direction rtl
PostPosted: Tue Aug 28, 2012 9:34 am 
Offline

Joined: Mon Aug 27, 2012 5:36 pm
Posts: 3
Thanks for the reply
Has anyone already tried and managed to get direction right to left


Top
 Profile  
Reply with quote  
 Post subject: Re: direction rtl
PostPosted: Tue Aug 28, 2012 9:52 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3095
Location: Cologne, Germany
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.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject: Re: direction rtl
PostPosted: Thu Aug 30, 2012 7:14 am 
Offline

Joined: Mon Aug 27, 2012 5:36 pm
Posts: 3
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 182 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group