[Poppler-bugs] [Bug 12522] pdftohtml -c generates html with very ugly/unusual spacing

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jun 8 13:15:36 PDT 2010


https://bugs.freedesktop.org/show_bug.cgi?id=12522

--- Comment #4 from Mike Slegeir <tehpola at yahoo.com> 2010-06-08 13:15:36 PDT ---
Created an attachment (id=36165)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=36165)
An example PDF which will demonstrate the font spacing issues

The issue appears to be caused by an adjustment of the font sizes.  The test
document demonstrates the issue when run through pdftohtml and explains the
problem:

The symptoms of the problem are that certain effects such as underlining and
strike-through are misaligned, and occasional gaps in the text are present when
a new section of text begins on the same line.
    I believe the font shrinking comes from two lines of code:
HTMLOutputDev.cc:124 and HTMLFonts.cc:118.  Both lines subtract 1 from the font
size, the former also truncates any fractional value.

I can't understand the purpose of the two subtractions.  The truncating does
make sense though: it's better to round down than to round up because having
text run together is much worse than having small gaps.  Can anyone motivate
subtracting 2 from the PDF font size to get the HTML font size?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Poppler-bugs mailing list