[Poppler-bugs] [Bug 49864] New: Wrong font id used when first word of a line has certain style applied (xml)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun May 13 05:46:10 PDT 2012


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

             Bug #: 49864
           Summary: Wrong font id used when first word of a line has
                    certain style applied (xml)
    Classification: Unclassified
           Product: poppler
           Version: unspecified
          Platform: All
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: medium
         Component: pdftohtml
        AssignedTo: poppler-bugs at lists.freedesktop.org
        ReportedBy: lparravi at gmail.com


Created attachment 61552
  --> https://bugs.freedesktop.org/attachment.cgi?id=61552
Test files to reproduce the bug

When generating an xml version of a pdf, the font id used in a certain line of
the text seems to be that of the first word of that line.

This creates the following bug: it the first word in a line contains a word
with italics, the font id outputted for the whole line is the font of the
italic word, not of the rest of the line.

I've created a file in LibreOffice (I've come accross this problem with pdf
created with other programs so it's not a problem in the way LibreOffice is
generating the pdf) with four lines like the following text (italic words are
marked here with <i> tags): 

------------
Line 1
line 2
<i>line</i> 3
line <i>4</i>
------------

All the text has the same font/size applied. And the xml generated is:


<page number="1" position="absolute" top="0" left="0" height="1263"
width="892">
        <fontspec id="0" size="16" family="Times" color="#000000"/>
        <fontspec id="1" size="16" family="Times" color="#000000"/>
<text top="85" left="85" width="46" height="20" font="0">Line 1</text>
<text top="106" left="85" width="41" height="20" font="1"><i>line</i> 2</text>
<text top="126" left="85" width="40" height="20" font="0">line 3</text>
<text top="147" left="85" width="41" height="20" font="0">line <i>4</i></text>
</page>

-- 
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