<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Debenu Quick PDF Library - PDF SDK Community Forum : RUSSIAN_CHARSET</title>
  <link>http://www.quickpdf.org/forum/</link>
  <description><![CDATA[This is an XML content feed of; Debenu Quick PDF Library - PDF SDK Community Forum : I need help - I can help : RUSSIAN_CHARSET]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 24 May 2026 15:50:42 +0000</pubDate>
  <lastBuildDate>Wed, 13 Jun 2012 18:03:11 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 11.01</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.quickpdf.org/forum/RSS_post_feed.asp?TID=2156</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Debenu Quick PDF Library - PDF SDK Community Forum]]></title>
   <url>http://www.quickpdf.org/forum/forum_images/QPDF_Forum_Title.png</url>
   <link>http://www.quickpdf.org/forum/</link>
  </image>
  <item>
   <title><![CDATA[RUSSIAN_CHARSET :    ... and would require 1251...]]></title>
   <link>http://www.quickpdf.org/forum/russian-charset_topic2156_post9761.html#9761</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=270">Autodidact</a><br /><strong>Subject:</strong> 2156<br /><strong>Posted:</strong> 13 Jun 12 at 6:03PM<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Quote" alt="Quote" style="vertical-align: text-bottom;" /> ... <span style=": rgb251, 251, 253; font-family: 'Courier New', Courier, mono; text-align: left; ">and would require 1251 encoded strings to be passed to DrawText</span>.</td></tr></table><br>Interesting detail. I wonder what that dictates in Classic ASP. One should think; nothing, as the same variable data is passed to the browser correctly ...<br>]]>
   </description>
   <pubDate>Wed, 13 Jun 2012 18:03:11 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/russian-charset_topic2156_post9761.html#9761</guid>
  </item> 
  <item>
   <title><![CDATA[RUSSIAN_CHARSET : Some further informationQPL 8.xx...]]></title>
   <link>http://www.quickpdf.org/forum/russian-charset_topic2156_post9758.html#9758</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 2156<br /><strong>Posted:</strong> 13 Jun 12 at 2:51AM<br /><br />Some further information<div><br></div><div>QPL 8.xx is now compiled with Unicode strings internally. So when you call AddTrueTypeSubsettedFont you pass in Unicode characters and then also use Unicode characters for DrawText, DrawHTMLText etc..</div><div><br></div><div>With QPL 7 -&nbsp;<span style=": rgb251, 251, 253; font-family: 'Courier New', Courier, mono; text-align: left; ">QP.AddTrueTypeFont('Czar{1251}', 0) would create a 255 character font using the 1251 character set and would require 1251 encoded strings to be passed to DrawText</span></div><div><span style=": rgb251, 251, 253; font-family: 'Courier New', Courier, mono; text-align: left; "><br></span></div><div>This forum doesn't display foreign characters correctly unfortunately.</div><div><span style=": rgb251, 251, 253; font-family: 'Courier New', Courier, mono; text-align: left; "><br></span></div><div><span style=": rgb251, 251, 253; font-family: 'Courier New', Courier, mono; text-align: left; ">Andrew.</span></div><div><br></div>]]>
   </description>
   <pubDate>Wed, 13 Jun 2012 02:51:58 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/russian-charset_topic2156_post9758.html#9758</guid>
  </item> 
  <item>
   <title><![CDATA[RUSSIAN_CHARSET : I appreciate you taking the time...]]></title>
   <link>http://www.quickpdf.org/forum/russian-charset_topic2156_post9757.html#9757</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=270">Autodidact</a><br /><strong>Subject:</strong> 2156<br /><strong>Posted:</strong> 11 Jun 12 at 10:26PM<br /><br />I appreciate you taking the time never the less. Sometimes the treasure is not a solution but that someone spends their time to try helping out.&nbsp;<div><br></div><div>Often a thought that didn't cross <i>my</i> mind, can be the path to a solution. And, one day someone else find the info here of good value to them. Personally I find most of my answers by searching and reading, rather than posting a question.</div>]]>
   </description>
   <pubDate>Mon, 11 Jun 2012 22:26:29 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/russian-charset_topic2156_post9757.html#9757</guid>
  </item> 
  <item>
   <title><![CDATA[RUSSIAN_CHARSET :   Hi Haakon,here is a nice helper:...]]></title>
   <link>http://www.quickpdf.org/forum/russian-charset_topic2156_post9752.html#9752</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1569">edvoigt</a><br /><strong>Subject:</strong> 2156<br /><strong>Posted:</strong> 08 Jun 12 at 4:48PM<br /><br />Hi Haakon,<br><br>here is a nice helper: <a href="http://stackoverflow.com/questi&#111;ns/1833062/how-to-measure-the-pixel-width-of-a-digit-in-a-given-font-size-c" target="_blank">http://stackoverflow.com/questions/1833062/how-to-measure-the-pixel-width-of-a-digit-in-a-given-font-size-c</a><br><br>There is fine solution for exactly determing charwidth of single chars in a given font in pixel.<span ="kwd"=""></span><span ="pln"=""> </span><br><pre ="lang-cs="" prettyprint"=""><code><span ="pln"="">  float size = 5;<br>&nbsp; </span><span ="kwd"="">for</span><span ="pln"=""> </span><span ="pun"="">(</span><span ="kwd"="">int</span><span ="pln"=""> ix </span><span ="pun"="">=</span><span ="pln"=""> </span><span ="lit"="">0</span><span ="pun"="">;</span><span ="pln"=""> ix </span><span ="pun"="">&lt;</span><span ="pln"=""> </span><span ="lit"="">10</span><span ="pun"="">;</span><span ="pln"=""> </span><span ="pun"="">++</span><span ="pln"="">ix</span><span ="pun"="">)</span><span ="pln"=""> </span><span ="pun"="">{</span><span ="pln"=""><br>&nbsp; &nbsp; </span><span ="kwd"="">var</span><span ="pln"=""> font </span><span ="pun"="">=</span><span ="pln"=""> </span><span ="kwd"="">new</span><span ="pln"=""> </span><span ="typ"="">Font</span><span ="pun"="">(</span><span ="str"="">"Calibri"</span><span ="pun"="">,</span><span ="pln"=""> size</span><span ="pun"="">,</span><span ="pln"=""> </span><span ="typ"="">FontStyle</span><span ="pun"="">.</span><span ="typ"="">Regular</span><span ="pun"="">);</span><span ="pln"=""><br>&nbsp; &nbsp; </span><span ="kwd"="">string</span><span ="pln"=""> txt </span><span ="pun"="">=</span><span ="pln"=""> </span><span ="kwd"="">new</span><span ="pln"=""> </span><span ="kwd"="">string</span><span ="pun"="">(</span><span ="str"="">'0'</span><span ="pun"="">,</span><span ="pln"=""> </span><span ="lit"="">100</span><span ="pun"="">);</span><span ="pln"=""><br>&nbsp; &nbsp; </span><span ="typ"="">SizeF</span><span ="pln"=""> sz1 </span><span ="pun"="">=</span><span ="pln"=""> </span><span ="typ"="">TextRenderer</span><span ="pun"="">.</span><span ="typ"="">MeasureText</span><span ="pun"="">(</span><span ="str"="">"00"</span><span ="pun"="">,</span><span ="pln"=""> font</span><span ="pun"="">)</span><span ="pln"=""> </span><span ="pun"="">-</span><span ="pln"=""> </span><span ="typ"="">TextRenderer</span><span ="pun"="">.</span><span ="typ"="">MeasureText</span><span ="pun"="">(</span><span ="str"="">"0"</span><span ="pun"="">,</span><span ="pln"=""> font</span><span ="pun"="">);</span><span ="pln"=""><br>&nbsp; &nbsp; </span><span ="typ"="">Console</span><span ="pun"="">.</span><span ="typ"="">WriteLine</span><span ="pun"="">(</span><span ="str"="">"{0} {1:N3}"</span><span ="pun"="">,</span><span ="pln"=""> size</span><span ="pun"="">,</span><span ="pln"=""> sz1</span><span ="pun"="">.</span><span ="typ"="">Width</span><span ="pun"="">);</span><span ="pln"=""><br>&nbsp; &nbsp; size </span><span ="pun"="">+=</span><span ="pln"=""> </span><span ="lit"="">2</span><span ="pun"="">;</span><span ="pln"=""><br></span><span ="pun"="">}</span><span ="pln"=""><br></span></code></pre>The trick is to build the difference between a single char ('0')&nbsp; and a double of it ('00'). Because in the reported width is ever a padding around, the minus is eliminating it.<br><br>I would take a a very big fontsize to get for every glyph a good estimation for its pure width on this size. Then you may build your own small textoutroutine, which "knows" the charwidth. How much padding is then your choice.<br><br>Happy coding,<br><br>Werner<br><span style="font-size:10px"><br /><br />Edited by edvoigt - 09 Jun 12 at 6:10PM</span>]]>
   </description>
   <pubDate>Fri, 08 Jun 2012 16:48:21 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/russian-charset_topic2156_post9752.html#9752</guid>
  </item> 
  <item>
   <title><![CDATA[RUSSIAN_CHARSET :  Hi Haakon,now you understand,...]]></title>
   <link>http://www.quickpdf.org/forum/russian-charset_topic2156_post9751.html#9751</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1569">edvoigt</a><br /><strong>Subject:</strong> 2156<br /><strong>Posted:</strong> 08 Jun 12 at 2:37PM<br /><br />Hi Haakon,<br><br>now you understand, that I'm not too proud about my help. Because I'm unable to get a Charwidthinfo for Calibri. <br><br>The value 3 mm in my loop over the string is only to show, that it works with russian output. Maybe you can get for a given fontsize (as big as possible for quality) from any other program for every glyph its width, you would have a foot in the door. This solution would be without kerning, but better than nothing.<br><br>On <a href="http://www.microsoft.com/typography/FreeToolsOverview.mspx" target="_blank">http://www.microsoft.com/typography/FreeToolsOverview.mspx</a> you find a lot of information, but I think it's not your intent to learn all about font-inside.<br><br>Maybe there is something to do for the QPL-developers, because I have seen, that older TTF-Tools dont like Calibri.TTF.<br><br>Cheers,<br><br>Werner<br>]]>
   </description>
   <pubDate>Fri, 08 Jun 2012 14:37:31 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/russian-charset_topic2156_post9751.html#9751</guid>
  </item> 
  <item>
   <title><![CDATA[RUSSIAN_CHARSET : Thank you very much Werner!After...]]></title>
   <link>http://www.quickpdf.org/forum/russian-charset_topic2156_post9750.html#9750</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=270">Autodidact</a><br /><strong>Subject:</strong> 2156<br /><strong>Posted:</strong> 08 Jun 12 at 12:38PM<br /><br />Thank you very much Werner!<div><br></div><div>After looking a bit on your code, almost taking a plunge to convert and test in PowerBasic, I decided to run tests as clean and simple as possible, in the&nbsp;environment&nbsp;it is needed to work.</div><div><br></div><div>To my dismay, testing revealed that it did not even work with fonts that the library (7.25) reported to be capable of using the&nbsp;necessary&nbsp;charset. I had the library list the capable fonts, where Calibri is&nbsp;omitted, although we know it can handle Russian.</div><div><br></div><div>The conclusion after my last testing, just now, is that early versions of the library (I have tried 5.11 and 7.25) are&nbsp;incapable&nbsp;of performing as intended/documented. After trying 8.15, I luckily/finally got the expected result — Russian output from both DrawText and DrawHTMLTextBox, without obvious kerning issues as you indicated possibly could be the next challenge to overcome.</div><div><br></div><div>Now I just need to go through the process of having my web host update the library they installed for me years back. Meaning I have to rewrite the the old 5.11 syntax and purchase my license upgrade.</div><div><br></div>]]>
   </description>
   <pubDate>Fri, 08 Jun 2012 12:38:58 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/russian-charset_topic2156_post9750.html#9750</guid>
  </item> 
  <item>
   <title><![CDATA[RUSSIAN_CHARSET :  Hi Haakon,here a dirty working...]]></title>
   <link>http://www.quickpdf.org/forum/russian-charset_topic2156_post9729.html#9729</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1569">edvoigt</a><br /><strong>Subject:</strong> 2156<br /><strong>Posted:</strong> 06 Jun 12 at 9:57AM<br /><br />Hi Haakon,<br><br>here a dirty working entry with Calibri-Font, using unicode.<br><br>It is made by Delphi 7 under XP.<br><font face="Courier New, Courier, mono"><br>&nbsp; sid, cid: integer;<br>&nbsp; Chars: widestring; // for the chars we need in Calibri<br>&nbsp; k: integer;<br>&nbsp; p: double; // position, because of of Charwidth-problem<br>begin<br>&nbsp; QP := TQuickPDF.Create;<br>&nbsp; QP.UnlockKey({$I PDFkey.inc});<br>&nbsp; QP.SetOrigin(0);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Bottomleft<br>&nbsp; QP.SetMeasurementUnits(1);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Millimeter<br>&nbsp; sid := QP.AddStandardFont(4);&nbsp;&nbsp;&nbsp; // Helvetica for english<br><br>//&nbsp; build a string with all needed chars&nbsp; <br>&nbsp; for k:=$0400 to $0420 do Chars := Chars+wideChar(k); // only a first part<br>&nbsp; cid := QP.AddTrueTypeSubsettedFont('Calibri', Chars, 0); // and for russian<br><br>// output text with correct font<br>&nbsp; QP.SelectFont(sid);<br>&nbsp; QP.DrawText(25, 260, 'russian has own letters:');<br>&nbsp; QP.SelectFont(cid); // now change font to a russian<br>&nbsp; p := 0;<br>&nbsp; for k:=1 to Length(Chars)<br>&nbsp; do begin<br>&nbsp;&nbsp;&nbsp; QP.DrawText(80+p, 260, Chars<em>&#091;k&#093;);<br>&nbsp;&nbsp;&nbsp; p := p+ 3; // CharWidth or TextWidth return 0 - why, unknown<br>&nbsp; end;<br><br>//&nbsp; QP.DrawText(80, 260, Chars); dont work, puts all on the same position<br><br>&nbsp; QP.SelectFont(sid); // switch back<br>&nbsp; QP.DrawText(25, 250, 'and back to english');</em></font><em><br><br>It works, but there is something wrong. With Drawtext all glyphs go one above the other on the same position. So I used the fixed value of 3 only for this demonstration.<br><br>So you get the right glyphs, but you have something to do for better quality.<br><br><br>Cheers,<br>Werner<br><br></em><span style="font-size:10px"><br /><br />Edited by edvoigt - 06 Jun 12 at 9:59AM</span>]]>
   </description>
   <pubDate>Wed, 06 Jun 2012 09:57:09 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/russian-charset_topic2156_post9729.html#9729</guid>
  </item> 
  <item>
   <title><![CDATA[RUSSIAN_CHARSET : That is OK Werner, thank you for...]]></title>
   <link>http://www.quickpdf.org/forum/russian-charset_topic2156_post9722.html#9722</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=270">Autodidact</a><br /><strong>Subject:</strong> 2156<br /><strong>Posted:</strong> 05 Jun 12 at 5:09PM<br /><br />That is OK Werner, thank you for spending a little time on me anyway. I am after thoughts to follow up on, not a full solution, so any ideas are welcome - if they lead to solving the issue or not.&nbsp;<br><br>The top line in the image is the result of explicitly trying to use Calibri to dynamically produce Russian text in the PDF file. The text in the image that is readable Russian is set in the same font in Corel Draw and exported as a template PDF file that I need to populate with more text.&nbsp;]]>
   </description>
   <pubDate>Tue, 05 Jun 2012 17:09:28 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/russian-charset_topic2156_post9722.html#9722</guid>
  </item> 
  <item>
   <title><![CDATA[RUSSIAN_CHARSET : Hi Autodidact,in the moment I&amp;#039;m...]]></title>
   <link>http://www.quickpdf.org/forum/russian-charset_topic2156_post9718.html#9718</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1569">edvoigt</a><br /><strong>Subject:</strong> 2156<br /><strong>Posted:</strong> 05 Jun 12 at 2:41PM<br /><br />Hi Autodidact,<br><br><br>in the moment I'm very short of time. I have something to produce and I'm so fare from the goal. <br><br>My first intention goes in the direction, that your font is unable for russian. Is it really the same, as for the russian readable like "podkladka" (looks nice in latin letters), which you use for the inputvalue after this? <br>Maybe you have to switch between differents fonts/charsets depending from your text.<br><br>Maybe too, that I'm here on a very wrong way...<br><br>Cheers,<br><br>Werner<br>]]>
   </description>
   <pubDate>Tue, 05 Jun 2012 14:41:22 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/russian-charset_topic2156_post9718.html#9718</guid>
  </item> 
  <item>
   <title><![CDATA[RUSSIAN_CHARSET : I can see the Russian text in...]]></title>
   <link>http://www.quickpdf.org/forum/russian-charset_topic2156_post9717.html#9717</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=270">Autodidact</a><br /><strong>Subject:</strong> 2156<br /><strong>Posted:</strong> 05 Jun 12 at 2:12PM<br /><br />I can see the Russian text in the code fails to show in the forum as well.]]>
   </description>
   <pubDate>Tue, 05 Jun 2012 14:12:33 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/russian-charset_topic2156_post9717.html#9717</guid>
  </item> 
 </channel>
</rss>