[poppler] Bug in pdftohtml

Josh Richardson jric at chegg.com
Mon Jun 13 13:53:05 PDT 2011


FYI, I recently submitted a patch related to this part of the code, which
I believe will take care of the completely overlap case:

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

Best, --josh

On 6/13/11 8:00 AM, "Joaquin Cuenca Abela" <joaquin at cuencaabela.com> wrote:

>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
>_______________________________________________
>poppler mailing list
>poppler at lists.freedesktop.org
>http://lists.freedesktop.org/mailman/listinfo/poppler
>



More information about the poppler mailing list