[poppler] Bug in pdftohtml

Albert Astals Cid aacid at kde.org
Mon Jun 13 11:23:19 PDT 2011


A Monday, June 13, 2011, Joaquin Cuenca Abela va escriure:
> 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;

Do you have any pdf that gets fixed by applying this "patch"?

Albert


More information about the poppler mailing list