Print Page | Close Window

DrawHTMLText (8.11) special characters?

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1956
Printed Date: 25 Jun 25 at 1:11PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: DrawHTMLText (8.11) special characters?
Posted By: infrax
Subject: DrawHTMLText (8.11) special characters?
Date Posted: 14 Sep 11 at 7:43AM
With 7.x version I used this code to print html code:

  q.SetHTMLNormalFont("Default", q.AddTrueTypeFont("Arial {1250}", 0));
  q.SetHTMLBoldFont("Default", q.AddTrueTypeFont("Arial [Bold] {1250}", 0));
  q.SetHTMLItalicFont("Default", q.AddTrueTypeFont("Arial [Italic] {1250}", 0));
  q.SetHTMLBoldItalicFont("Default", q.AddTrueTypeFont("Arial [BoldItalic] {1250}", 0));

  q.DrawHTMLText(left, top, right, text);

And it was working OK, all eastern europe characters were shown. Now with 8.11 version eastern europe characters are not printed OK.

In this forum I noticed that there is a bug in DrawHTMLTextBox function. Is this a bug also here, or should I use different code to do this?

Thanks



Replies:
Posted By: infrax
Date Posted: 26 Sep 11 at 9:37AM
Anyone?


Posted By: Lord Jim
Date Posted: 26 Sep 11 at 1:40PM
You might want to try the 8.12 beta that was released last week. DrawHTMLTextBox does still have some issues, but they did fix a few things.


Posted By: AndrewC
Date Posted: 26 Sep 11 at 2:11PM
What characters in particular are you having problems with ?

I tried German which did not work with 1250 but did work as expected with 1252.

Is 1250 the correct code page ?  It might be worth trying 1252.

The 8.11 version is now fully Unicode so you need to pass in the Unicode version of the characters you want to draw.  

You can also try AddTrueTypeSubsettedFont() which will work better in QPL 8.11.  I will review with the QPL team.  Now that QPL is Unicode the {xxxx} system would work differently from QPL 7.xx as you have found.

Andrew.


Posted By: infrax
Date Posted: 28 Sep 11 at 1:47PM
1250 is the correct code page -> east europe.

I tried 8.12 version -> no luck.
Played with  AddTrueTypeSubsettedFont() -> no luck.
Tried other code pages -> no luck.

I also tried German characters -> they show OK (with 1252).

Can you try it with Slovenian ones? -> ššš ččč žžž

I'm using C#. As I undestand all strings in C# are unicode so that shouldn't be a problem. Or not?

Thanks


Posted By: AndrewC
Date Posted: 28 Sep 11 at 3:25PM
I have confirmed there is a problem when using Slovenian text with the DrawHTML text function. The 1252 Code page is very similar to the Unicode character mappings which is why German and Norwegian ws wroking well for me.

DrawText is working perfectly well so we should be able to get it working for the 8.12 release.




Posted By: infrax
Date Posted: 29 Sep 11 at 6:06AM
Ok. Thanks



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk