<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; "><div>Yes, I'm aware of the Gecko vs. Webkit issue. &nbsp;I have a colleague checking with the Webkit developers &#8212; apparently a fix is underway for the decimal issues, but we're unsure when it will be ready. &nbsp;In the mean time, I tried using text-align-last, but Webkit doesn't seem to honor that. &nbsp;I tried text-align-justify, but Webkit seems to never reduce spacing in order to justify, so it breaks different than the original document.</div><div><br></div><div>Currently I'm working on a new option for pdftohtml which will place each word in its own span. &nbsp;While being heavy, this should overcome some of Webkit's current limitations, and make these pages more usable on Safari/Chrome, etc., although the character-spacing limitation will mean that all the justification will happen between words &#8212; less ideal than how it will work on FireFox.</div><div><br></div><div>I'm not sure exactly your issue with font extraction. &nbsp;Font extraction is relatively simple code with no external dependency, so that should be working. &nbsp;I have not built into pdftohtml to do font ^conversion^ into web-enabled formats (WOFF/TTF), because I think FontForge, etc. is more suitable for that particular task. &nbsp;I have a couple Python scripts to do it, which if it's acceptable to the Poppler maintainers, I'd be happy to check into the repository.</div><div><br></div><div>Best, --josh</div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Clément Wehrung &lt;<a href="mailto:cwehrung@gmail.com">cwehrung@gmail.com</a>&gt;<br><span style="font-weight:bold">Date: </span> Wed, 26 Oct 2011 08:14:09 -0700<br><span style="font-weight:bold">To: </span> Josh Richardson &lt;<a href="mailto:jric@chegg.com">jric@chegg.com</a>&gt;<br><span style="font-weight:bold">Cc: </span> Clément Wehrung &lt;<a href="mailto:cwehrung@nurves.com">cwehrung@nurves.com</a>&gt;, "<a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a>" &lt;<a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a>&gt;, Alec Taylor &lt;<a href="mailto:alec.taylor6@gmail.com">alec.taylor6@gmail.com</a>&gt;<br><span style="font-weight:bold">Subject: </span> Re: [poppler] pdftohtml does not preserve fonts<br></div><div><br></div>
                <div><div>Sure, but I reproduce there are (I believe) two issues here :&nbsp;<div>1) justification is more complicated with webkit due to not (really) working optimizeLegibility in WebKit and the fact that WebKit handles poorly decimal in word-spacing and not at all in letter-spacing</div><div>2) due to kerning (I can send you a screenshot comparing in Photoshop two texts one over the other) / letter-spacing / word-spacing (?), lines are much longer in WebKit =&gt; hence, if you have for example "footnotes" as in this PDF, they don't get at the right place in the text (all the more so as if you have a PDF from an InDesign export, there may be "metrics" which cause some text to go over another &#8212; yet, you can always remove all metrics before exporting in PDF&#8230;it avoids part of the issue)&nbsp;</div><div><br></div><div>NB : I don't manage to get the fonts extracted to work, but I can send those to you in otf if you want (don't know if extraction is not working due to my installation ?)&nbsp;</div></div><div><br></div><div>PDF file : ​<a href="http://cl.ly/0L3g2I1r3G2a0T0o3622" style="color: rgb(0, 106, 227); ">BugWebkit.pdf</a></div></div>
                <div><br>--&nbsp;<br>Clément Wehrung<br><div>06 88 10 65 91</div><br></div>
                 
                <p style="color: #A0A0A8;">Le mercredi 26 octobre 2011 à 14:35, Clément Wehrung a écrit :</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div>
                <div><div><div>You can understand better the issue here (Firefox vs Safari on Mac/iOS)</div><div><br></div><a href="http://dev.nurves.com/pdf2html/-6.html" style="color: rgb(0, 106, 227); ">http://dev.nurves.com/pdf2html/-6.html</a><div><br></div></div><div>Cf. footnotes</div></div><div><br></div>
                <div><a href="http://cl.ly/3c1B2V1X2u2C2f0M2L0L">WebKit.png</a></div><div><a href="http://cl.ly/0Q111C3u2g3T2U1D3U2u">Firefox.png</a></div><div>--&nbsp;<br>Clément Wehrung<br><div>06 88 10 65 91</div><br><br><br></div>
                  
                <p style="color: #A0A0A8;">Le mercredi 26 octobre 2011 à 14:26, Clément Wehrung a écrit :</p><blockquote type="cite"><div>
                    <span><div><div>
                <div><div>Hi Josh,<div><br></div><div>Thanks for all this. I'm already looking at the code now, but I've run into some issues with webkit rendering compared to Firefox (where it looks really amazing !). I know webkit has a bug with letter-spacing (does not take decimal into account) but there's more to it since text-rendering:optimizeLegibility; only partly works. I try to see how we could get text boxes not to end up one over the other. I can show you some screenshots if you want.&nbsp;</div><div><br></div><div>btw, when have you chosen not to use only the background image for all graphics ? is it in order to achieve some image over text ?</div><div><br></div><div>Thanks,&nbsp;</div><div><br></div><div>Clement</div></div></div>
                <div><br>--&nbsp;<br>Clément Wehrung<br><div>06 88 10 65 91</div><br></div>
                   
                <p style="color: #A0A0A8;">Le mardi 25 octobre 2011 à 00:41, Josh Richardson a écrit :</p><blockquote type="cite"><div>
                    <span><div><div><meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"><div>Ok, sent you a read-only access invitation for now. &nbsp;Thanks for your offer to help. &nbsp;Here is my bigger issues list to get a flavor &#8211; a lot of fun things to do. &nbsp;Let me know what you want to do with pdftohtml!</div><div><br></div><div><ol><li>Translate drawing operations into canvas with SVG</li><li>Find better way to calculate vertical positioning, by looking at browser source code</li><li>z-index handling -- currently text is never masked by graphics</li><li>Algorithmic extraction of TOC</li><li>Algorithmic extraction of page numbering (Alec may be working on this)</li><li>Algorithmic identification of chapters</li><li>Right-to-left text, proper display (e.g. Arabic, Hebrew)</li><li>Algorithmic detection of text flow (Stephen may be working on this)</li><li>Detection / removal of duplicate images</li><li>Jpg vs. png selection; automatically choose the best format for each image</li></ol></div><div>--josh</div><div><br></div><span><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Clément Wehrung &lt;<a href="mailto:cwehrung@nurves.com">cwehrung@nurves.com</a>&gt;<br><span style="font-weight:bold">Date: </span> Mon, 24 Oct 2011 15:27:23 -0700<br><span style="font-weight:bold">To: </span> Josh Richardson &lt;<a href="mailto:jric@chegg.com">jric@chegg.com</a>&gt;<br><span style="font-weight:bold">Cc: </span> "<a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a>" &lt;<a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a>&gt;, Alec Taylor &lt;<a href="mailto:alec.taylor6@gmail.com">alec.taylor6@gmail.com</a>&gt;<br><span style="font-weight:bold">Subject: </span> Re: [poppler] pdftohtml does not preserve fonts<br></div><div><br></div><div style="font-family: Helvetica; font-size: 13px; ">Sure ! Do you have a link for the repo so that I can already have a look (I didn't figure out which one it is right now) ? I'm really interested in helping you, if you need something on any specific topic don't hesitate. Many thanks again,<div><br></div><div>Clément</div></div><div style="font-family: Helvetica; font-size: 13px; "><br></div><br><div>On Mon, Oct 24, 2011 at 8:01 PM, Josh Richardson <span dir="ltr">&lt;<a href="mailto:jric@chegg.com">jric@chegg.com</a>&gt;</span> wrote:<br><blockquote type="cite"><div>Can you give me a couple of days? &nbsp;I want to try to get a repo hosted on,<br>
e.g. bitbucket, which is connected to my repo, so that it's easier to keep<br>
everything in synch. &nbsp;Alec Taylor set up a repo there already, which you<br>
can use to get an immediate snapshot if needed.<br><br>
Best, --josh<br><div><div><br>
On 10/24/11 10:45 AM, "iclems" &lt;<a href="mailto:cwehrung@nurves.Com">cwehrung@nurves.Com</a>&gt; wrote:<br><br>
&gt;<br>
&gt;Dear Josh,<br>
&gt;<br>
&gt;Being working on a pdftohtml project which requires font preservation, I'd<br>
&gt;be really interested in getting this too. Do you think it's possible ?<br>
&gt;<br>
&gt;Thanks,<br>
&gt;<br>
&gt;Clement<br>
&gt;<a href="mailto:cwehrung@gmail.com">cwehrung@gmail.com</a><br>
&gt;<br>
&gt;<br>
&gt;Josh Richardson wrote:<br>
&gt;&gt;<br>
&gt;&gt; Preserving fonts is not integrated into the master repository yet. &nbsp;If<br>
&gt;&gt;you<br>
&gt;&gt; like, I can send you a patched version of Poppler which will do it.<br>
&gt;&gt; You'll still have to run your own process (like Fontforge) to convert<br>
&gt;&gt;the<br>
&gt;&gt; fonts into a web-usable format, but it's straightforward as long as the<br>
&gt;&gt; fonts have mapping to unicode, and doable even without.<br>
&gt;&gt;<br>
&gt;&gt; --josh<br>
&gt;&gt;<br>
&gt;&gt; From: M Naveed Akram &lt;<a href="mailto:cmnajs@gmail.com">cmnajs@gmail.com</a>&lt;mailto:<a href="mailto:cmnajs@gmail.com">cmnajs@gmail.com</a>&gt;&gt;<br>
&gt;&gt; Date: Fri, 30 Sep 2011 06:52:14 -0700<br>
&gt;&gt; To:<br>
&gt;&gt;"<a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a>&lt;mailto:<a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a>&gt;"<br>
&gt;&gt; &lt;<a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a>&lt;mailto:<a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a>&gt;&gt;<br>
&gt;&gt; Subject: [poppler] pdftohtml does not preserve fonts<br>
&gt;&gt;<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; I have been using 0.16 release of poppler-utils, but I am facing a<br>
&gt;&gt; problem. When converting pdf to html using pdftohtml it does not<br>
&gt;&gt;preserve<br>
&gt;&gt; fonts in the output html. How can I solve this issue. Please help<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; poppler mailing list<br>
&gt;&gt; <a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
&gt;&gt; <a href="http://lists.freedesktop.org/mailman/listinfo/poppler" target="_blank">http://lists.freedesktop.org/mailman/listinfo/poppler</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;--<br>
&gt;View this message in context:<br>
&gt;<a href="http://old.nabble.com/pdftohtml-does-not-preserve-fonts-tp32569116p3271208" target="_blank">http://old.nabble.com/pdftohtml-does-not-preserve-fonts-tp32569116p3271208</a><br>
&gt;4.html<br>
&gt;Sent from the Free Desktop - poppler mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>
&gt;<br>
&gt;_______________________________________________<br>
&gt;poppler mailing list<br>
&gt;<a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
&gt;<a href="http://lists.freedesktop.org/mailman/listinfo/poppler" target="_blank">http://lists.freedesktop.org/mailman/listinfo/poppler</a><br>
&gt;<br><br></div></div></div></blockquote></div><br></span></div></div></span>
                   
                   
                   
                   
                </div></blockquote><div>
                    <br>
                </div>
            </div></div></span>
                  
                  
                  
                  
                </div></blockquote><div>
                    <br>
                </div>
            </div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>
            </span></body></html>