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

Czech in MigraDoc
https://forum.pdfsharp.net/viewtopic.php?f=2&t=1371
Page 1 of 1

Author:  mareks082 [ Sun Oct 10, 2010 4:29 pm ]
Post subject:  Czech in MigraDoc

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

Author:  Thomas Hoevel [ Mon Oct 11, 2010 7:40 am ]
Post subject:  Re: Czech in MigraDoc

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).

Author:  Thomas Hoevel [ Wed Oct 13, 2010 2:59 pm ]
Post subject:  Re: Czech in MigraDoc

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.

Author:  Baston [ Thu Jul 30, 2015 1:21 pm ]
Post subject:  Re: Czech in MigraDoc

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.

Author:  TH-Soft [ Fri Jul 31, 2015 7:16 am ]
Post subject:  Re: Czech in MigraDoc

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

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