<?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 : Font &#101;mbedded multiple times</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 : Font &#101;mbedded multiple times]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 03 Jun 2026 21:58:35 +0000</pubDate>
  <lastBuildDate>Fri, 20 Jan 2006 11:04:12 +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=273</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[Font &#101;mbedded multiple times : Thanks for the idea Ingo. I&amp;#039;ll...]]></title>
   <link>http://www.quickpdf.org/forum/font-embedded-multiple-times_topic273_post1102.html#1102</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=219">StanMarshall</a><br /><strong>Subject:</strong> 273<br /><strong>Posted:</strong> 20 Jan 06 at 11:04AM<br /><br /><P>Thanks for the idea Ingo. I'll play around with that.</P>]]>
   </description>
   <pubDate>Fri, 20 Jan 2006 11:04:12 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/font-embedded-multiple-times_topic273_post1102.html#1102</guid>
  </item> 
  <item>
   <title><![CDATA[Font &#101;mbedded multiple times : Hi Stan!  I&amp;#039;ve made own code...]]></title>
   <link>http://www.quickpdf.org/forum/font-embedded-multiple-times_topic273_post1085.html#1085</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 273<br /><strong>Posted:</strong> 19 Jan 06 at 1:46AM<br /><br />Hi Stan!<br /><br />I've made own code searching through the whole pdf-file collecting all embedded fonts and offer the result as a user information in a combobox.<br />First i decrypt the file and read the file-content into a string. There i'm looking for all font objects. It's fast enough for big files, too.<br /><br />Best regards,<br />Ingo<br />]]>
   </description>
   <pubDate>Thu, 19 Jan 2006 01:46:20 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/font-embedded-multiple-times_topic273_post1085.html#1085</guid>
  </item> 
  <item>
   <title><![CDATA[Font &#101;mbedded multiple times : I have done some more playing...]]></title>
   <link>http://www.quickpdf.org/forum/font-embedded-multiple-times_topic273_post1082.html#1082</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=219">StanMarshall</a><br /><strong>Subject:</strong> 273<br /><strong>Posted:</strong> 18 Jan 06 at 6:13PM<br /><br /><P>I have done some more playing around and have determined that this only happens with bold or italic fonts.</P><P>For example, "Arial &#091;Bold&#093;".</P><P>I think it has to do with the naming convention. Seems like QuickPDF recognizes the naming convention "fontname &#091;Bold&#093;" for adding fonts, but not for finding them.</P><P>A little more poking around should allow me to discover the naming convention it will use to find the fonts...then, hopefully,&nbsp;I'll just need to do some systematic name translation and it will work...hopefully <IMG src="http://www.quickpdf.org/forum/smileys/smiley5.gif" border="0"></P><P>If I figure it out, I will post the solution so anyone else who might run into this can&nbsp;find the answer.</P><P>In the meantime, if anyone has any thoughts, please post them.</P><P>Thanks.</P><P>Stan</P>]]>
   </description>
   <pubDate>Wed, 18 Jan 2006 18:13:50 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/font-embedded-multiple-times_topic273_post1082.html#1082</guid>
  </item> 
  <item>
   <title><![CDATA[Font &#101;mbedded multiple times : Hi all... It was great to stumble...]]></title>
   <link>http://www.quickpdf.org/forum/font-embedded-multiple-times_topic273_post1081.html#1081</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=219">StanMarshall</a><br /><strong>Subject:</strong> 273<br /><strong>Posted:</strong> 18 Jan 06 at 5:04PM<br /><br /><P>Hi all...</P><P>It was great to stumble across this forum. Thanks to all who started it. I share your dismay at the apparent demise of ISED.</P><P>I have a question: Does anyone know how to get QuickPDF to only embed a font if that font has not already been embedded in the document? And, if it has already been embedded in the document, to use that font for a specific call to DrawText?</P><P>At first, I was hoping AddTrueTypeFont would just be smart enough to realize the font I am asking it to add to the document was already there and, so, to not add it again. However, that does not seem to be the case.</P><P>So I tried this:</P><P>function CheckPDFDocumentForFont(thePDF : TiSEDQuickPDF; FontName : String) : LongInt;<BR>var<BR>&nbsp; FontCtr : Integer;<BR>&nbsp; FontCount : Integer;<BR>&nbsp; FontID : LongInt;<BR>begin<BR>&nbsp; Result := -999;</P><P>&nbsp; FontCount := thePDF.FindFonts;</P><P>&nbsp; for FontCtr := 1 to FontCount do<BR>&nbsp; begin<BR>&nbsp;&nbsp;&nbsp; FontID := thePDF.FontID(FontCtr);<BR>&nbsp;&nbsp;&nbsp; thePDF.SelectFont(FontID);<BR>&nbsp;&nbsp;&nbsp; if UpperCase(thePDF.FontName) = UpperCase(FontName) then<BR>&nbsp;&nbsp;&nbsp; begin<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Result := FontID;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<BR>&nbsp;&nbsp;&nbsp; end;<BR>&nbsp; end;</P><P>&nbsp; Result := -1; {font not found}<BR>end;</P><P><BR>function PrintTextControlOnPDFPage(...)<BR>begin<BR>&nbsp; FontID := CheckPDFDocumentForFont(thePDF,FontName);</P><P>&nbsp; if FontID &lt; 0 then FontID := thePDF.AddTrueTypeFont(FontName,1);</P><P>&nbsp; thePDF.SelectFont(FontID);</P><P>...<BR><BR>end;</P><P>(The PDF is already properly opened etc. before either of these routines is called.)</P><P>However, it still seems to re-embed the font for each text control that uses it. (My printing routines iterate through each visible control on a form and print each control independently...it's sort of a homegrown wysiwyg report designer.)</P><P>The font does not show up multiple times in Acrobat's "Document Properties|Fonts" list, but the space used by fonts increases (substantially) with each text control I add to the form I am printing...even if the text is only a three letter word.</P><P>Can anybody see any problems with the code I have pasted above (like why it would not find the font, or, if it does find the font, why it would re-embedd it anyway)? Or, does anyone have any ideas on how to get QuickPDF to stop embedding the same font multiple times (assuming that is really what is happening)?</P><P>I can think of a few possibilities like figuring out all of the necessary fonts and embedding them ahead of time or maintaining my own list of fonts that have been used. However,&nbsp;I would rather not use either of those approaches for reasons beyond the scope of this post (the second wouldn't be too bad if it works).</P><P>I would really like to be able to just&nbsp;ask QuickPDF&nbsp;"is the font used by this text&nbsp;control already embedded in the document? if&nbsp;so,&nbsp;just use it...if not, embed it" I can't figure out why the code I have pasted above does not seem to be doing that.</P><P>Any help would be greatly appreciated.</P><P>Thanks.</P><P>Stan</P><span style="font-size:10px"><br /><br />Edited by StanMarshall</span>]]>
   </description>
   <pubDate>Wed, 18 Jan 2006 17:04:10 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/font-embedded-multiple-times_topic273_post1081.html#1081</guid>
  </item> 
 </channel>
</rss>