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

Having trouble getting utf-8 to work.
https://forum.pdfsharp.net/viewtopic.php?f=2&t=2698
Page 1 of 1

Author:  GoranMandic [ Fri Jan 03, 2014 1:08 pm ]
Post subject:  Having trouble getting utf-8 to work.

Hi all : )

I am working on an MVC application, and I use MigraDoc and PDFSharp classes in my controllers to export my tables into pdf.
Unfortunately, I am having trouble with non-English characters.
I've read a post regarding this issue on stack overflow, http://stackoverflow.com/questions/7822 ... 92#7833892 , but this solution changes nothing in the outcome I get.

I have posted my code to pastebin, if you would care to look. It's mostly basic stuff, nothing out of this world.
http://pastebin.com/T20BrnpW //form class
http://pastebin.com/wQGhngUU //controller which instantiates the form class


Any help with this issue would be greatly appreciated.

Author:  GoranMandic [ Fri Jan 03, 2014 2:49 pm ]
Post subject:  Re: Having trouble getting utf-8 to work.

Ok, so after a little bit of tinkering, I figured out that the order in which I instantiate my PDFrenderer class and my document, was wrong. It seems that I need the renderer instance FIRST, and THEN create my document instance and render it. I will post my code on pastebin if anyone ever needs it.
http://pastebin.com/5BSaRzbC

Author:  () => true [ Fri Jan 03, 2014 3:20 pm ]
Post subject:  Re: Having trouble getting utf-8 to work.

GoranMandic wrote:
Ok, so after a little bit of tinkering, I figured out that the order in which I instantiate my PDFrenderer class and my document, was wrong.
I don't think so. Order should not matter.
Maybe you also changed something else.

Author:  GoranMandic [ Mon Jan 06, 2014 8:55 am ]
Post subject:  Re: Having trouble getting utf-8 to work.

@ () => true Well, I posted my entire code, and what you see is what I got. : )

I have made no other changes except the order in which I instantiate objects.

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