[poppler] Bug in pdftohtml

Joaquin Cuenca Abela joaquin at cuencaabela.com
Mon Jun 13 08:00:56 PDT 2011


Hi,

Looking at HtmlOutputDev.cc, line 488, it tries to compute whether
str1 and str2 overlap:

    if (str2->yMin >= str1->yMin && str2->yMin <= str1->yMax)
    {
        vertOverlap = str1->yMax - str2->yMin;
    } else
    if (str2->yMax >= str1->yMin && str2->yMax <= str1->yMax)
    {
        vertOverlap = str2->yMax - str1->yMin;
    } else
    {
        vertOverlap = 0;
    }

it seems to be this code lacks a case for when str2 fully contains str1, ie:

if (str2->yMin < str1->yMin && str2->yMax > str1->yMax)
  vertOverlap = str2->yMax - str1->yMin;


-- 
Joaquin Cuenca Abela -- presspeople.com: Fuentes de prensa y comunicados


More information about the poppler mailing list