<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ex Scientia : PDF</title><link>http://blogs.msdn.com/exscientia/archive/tags/PDF/default.aspx</link><description>Tags: PDF</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Publishing Workflow – Math content as paths vs glyphs in generated PDF files</title><link>http://blogs.msdn.com/exscientia/archive/2008/04/02/publishing-workflow-when-generating-a-pdf-file-from-word-math-content-may-result-in-paths-instead-of-fonts.aspx</link><pubDate>Thu, 03 Apr 2008 01:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8352598</guid><dc:creator>pablofe</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/exscientia/comments/8352598.aspx</comments><wfw:commentRss>http://blogs.msdn.com/exscientia/commentrss.aspx?PostID=8352598</wfw:commentRss><description>&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Recently I was involved in diagnosing an issue where, when&amp;nbsp;a PDF file was generated from Word 2007, the Math content from the Word document was being converted to paths, instead of being represented by glyphs from the &lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:place w:st="on"&gt;Cambria&lt;/st1:place&gt; Math font.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Note that you can download a free&amp;nbsp;add-in to generate PDF files from Word 2007 from &lt;A title=here href="http://www.microsoft.com/downloads/details.aspx?FamilyID=4d951911-3e7e-4ae6-b059-a2e79ed87041&amp;amp;DisplayLang=en" target=_blank mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=4d951911-3e7e-4ae6-b059-a2e79ed87041&amp;amp;DisplayLang=en"&gt;here&lt;/A&gt;.&amp;nbsp; Also, Word 2007 has quite a bit of new Math &lt;A href="http://blogs.msdn.com/murrays/default.aspx"&gt;functionality&lt;/A&gt;, and a beautiful font to go along with it (Cambria Math).&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;When the goal is to generate high quality content, whether Math content&amp;nbsp;is represented as paths or glyphs makes a difference.&amp;nbsp; Note that this is not something that a casual observer would necessarily notice, as seen in these screen shots at 100% magnification.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;The first screenshot is from the content in Word.&amp;nbsp; The second is of the generated PDF file with the content as paths.&amp;nbsp; The third image is of the generated PDF file with the content as glyphs.&amp;nbsp; There is very little difference in the three screen shots below (at least to me).&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&amp;nbsp;&lt;SPAN style="mso-no-proof: yes"&gt;&lt;?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /&gt;&lt;v:shapetype id=_x0000_t75 stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"&gt; &lt;IMG title="Original content in Word" style="WIDTH: 413px; HEIGHT: 90px" height=90 alt="Original content in Word" src="http://www.fernicola.org/loquitor/uploads/equationinword.jpg" width=413 align=middle mce_src="http://www.fernicola.org/loquitor/uploads/equationinword.jpg"&gt;&lt;v:stroke joinstyle="miter"&gt;&lt;/v:stroke&gt;&lt;v:formulas&gt;&lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @0 1 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum 0 0 @1"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @2 1 2"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @3 21600 pixelWidth"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @3 21600 pixelHeight"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @0 0 1"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @6 1 2"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @7 21600 pixelWidth"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @8 21600 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @7 21600 pixelHeight"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @10 21600 0"&gt;&lt;/v:f&gt;&lt;/v:formulas&gt;&lt;v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"&gt;&lt;/v:path&gt;&lt;o:lock aspectratio="t" v:ext="edit"&gt;&lt;/o:lock&gt;&lt;/v:shapetype&gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Original content in Word&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;IMG title="Path based content at 100%" style="WIDTH: 338px; HEIGHT: 66px" height=66 alt="Path based content at 100%" src="http://www.fernicola.org/loquitor/uploads/PDFpaths100percent.jpg" width=338 align=middle mce_src="http://www.fernicola.org/loquitor/uploads/PDFpaths100percent.jpg"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-no-proof: yes"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Path based content in Adobe’s PDF viewer (100% zoom)&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;IMG title="Glyph based content at 100%" style="WIDTH: 328px; HEIGHT: 90px" height=90 alt="Glyph based content at 100%" src="http://www.fernicola.org/loquitor/uploads/PDFglyphs100percent.jpg" width=328 align=middle mce_src="http://www.fernicola.org/loquitor/uploads/PDFglyphs100percent.jpg"&gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Glyph based content in Adobe’s PDF viewer (100% zoom)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;However, when zooming in at 600%, it is possible to start noticing that, in the case where paths were used, the curves have discrete line segments, whereas the glyph version continues to be smooth.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&amp;nbsp;&lt;IMG title="Path based content at 600%" style="WIDTH: 450px; HEIGHT: 154px" height=154 alt="Path based content at 600%" src="http://www.fernicola.org/loquitor/uploads/paths600percent.jpg" width=450 align=middle mce_src="http://www.fernicola.org/loquitor/uploads/paths600percent.jpg"&gt;&lt;SPAN style="mso-no-proof: yes"&gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Path based content at 600%magnification, note the aliasing on the curved segments.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;IMG title="Glyph based content at 600%" style="WIDTH: 452px; HEIGHT: 131px" height=131 alt="Glyph based content at 600%" src="http://www.fernicola.org/loquitor/uploads/glyph600percent.jpg" width=452 align=middle mce_src="http://www.fernicola.org/loquitor/uploads/glyph600percent.jpg"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-no-proof: yes"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Glyph based content at 600% magnification, perfect!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Initially we could not reproduce the problem in our environment over here (let me tell you how much I hate it when we cannot reproduce bugs).&amp;nbsp; In talking to the folks that reported the problem, we verified that the fonts were correctly&amp;nbsp;installed and the font file versions were as expected.&amp;nbsp; Folks in the Word team then tracked down under which conditions paths would get generated, and we also found out that the original problem was being seen on a Windows Server 2003 installation, not on a client configuration.&amp;nbsp; &lt;EM&gt;Note that this is not an issue that one would run into with Windows Vista, because it has a different default configuration.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;From there it was straightforward to verify and solve the problem.&amp;nbsp; When exporting content, Word checks whether Complex Scripts or &lt;st1:place w:st="on"&gt;Far East&lt;/st1:place&gt; scripts are enabled on the machine, to decide whether to generate paths or glyphs for Math content.&amp;nbsp; In case you run into a similar issue, the solution was to enable both scripts on the server (which may require the installation disk and a reboot), through the Languages tab in the Regional Settings control panel.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;It is nice to have a happy ending to problems, and in this case&amp;nbsp;being able to preserve high quality Math content.&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8352598" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/exscientia/archive/tags/Publishing+Workflow/default.aspx">Publishing Workflow</category><category domain="http://blogs.msdn.com/exscientia/archive/tags/PDF/default.aspx">PDF</category><category domain="http://blogs.msdn.com/exscientia/archive/tags/Math/default.aspx">Math</category></item></channel></rss>