PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 9:41 am

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: Czech in MigraDoc
PostPosted: Sun Oct 10, 2010 4:29 pm 
Offline

Joined: Sun Oct 10, 2010 4:19 pm
Posts: 1
Hi,

I would like to ask if MigraDoc supports czech language. When I use PdfSharp it is OK but MigraDoc writes some characters wrong(e.g Č and ě).
Thanks for you answer.

Marek


Top
 Profile  
Reply with quote  
 Post subject: Re: Czech in MigraDoc
PostPosted: Mon Oct 11, 2010 7:40 am 
Offline
PDFsharp Guru
User avatar

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

Looks like this is a bug in MigraDoc and I put it on the bug list.

All LTR unicode characters should work (including Czech).

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject: Re: Czech in MigraDoc
PostPosted: Wed Oct 13, 2010 2:59 pm 
Offline
PDFsharp Guru
User avatar

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

I made some tests today.

It seems this is not a bug.

Just pass true as first parameter to this function:
Code:
PdfDocumentRenderer renderer = new PdfDocumentRenderer(true, PdfSharp.Pdf.PdfFontEmbedding.Always);


If you pass false here, the document will be created using the ANSI font (codepage 1252 or ISO 8859-1) and characters not available will be mapped to the plain character without diacritical mark.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject: Re: Czech in MigraDoc
PostPosted: Thu Jul 30, 2015 1:21 pm 
Offline

Joined: Thu Jul 30, 2015 1:15 pm
Posts: 1
Thomas Hoevel wrote:
Hi!

I made some tests today.

It seems this is not a bug.

Just pass true as first parameter to this function:
Code:
PdfDocumentRenderer renderer = new PdfDocumentRenderer(true, PdfSharp.Pdf.PdfFontEmbedding.Always);


If you pass false here, the document will be created using the ANSI font (codepage 1252 or ISO 8859-1) and characters not available will be mapped to the plain character without diacritical mark.


And what about using Migradoc in PdfSharp,

when I try mixing PdfSharp and Migradoc, can I still set this somehow ?

Code:
DocumentRenderer docRenderer = new DocumentRenderer(document);
docRenderer.PrepareDocument();
docRenderer.RenderPage(gfx, 1);


because diacritics like č or ř are removed.


Top
 Profile  
Reply with quote  
 Post subject: Re: Czech in MigraDoc
PostPosted: Fri Jul 31, 2015 7:16 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 916
Location: CCAA
Baston wrote:
And what about using Migradoc in PdfSharp,

when I try mixing PdfSharp and Migradoc, can I still set this somehow?
With PDFsharp this is a parameter of the XFont constructor. Make sure to create Unicode fonts.

http://pdfsharp.net/wiki/Unicode-sample.ashx

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


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: Baidu [Spider], Google [Bot] and 371 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