[poppler] poppler/Annot.cc

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Mon May 10 08:43:54 PDT 2010


 poppler/Annot.cc |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit a3e40b460b7690ef73ccf143b10da07e91d9ee7f
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Mon May 10 17:41:04 2010 +0200

    [annots] Adjust bbox for line annots when y1 = y2
    
    Some documents like pdf_commenting_new.pdf, have y1 = y2 but
    line_width > 0, acroread renders the lines in such cases even though the
    annot bbox is empty.

diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 54faadf..2fe8ae3 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -2321,6 +2321,16 @@ void AnnotLine::draw(Gfx *gfx, GBool printing) {
   if (!isVisible (printing))
     return;
 
+  /* Some documents like pdf_commenting_new.pdf,
+   * have y1 = y2 but line_width > 0, acroread
+   * renders the lines in such cases even though
+   * the annot bbox is empty. We adjust the bbox here
+   * to avoid having an empty bbox so that lines
+   * are rendered
+   */
+  if (rect->y1 == rect->y2)
+    rect->y2 += border ? border->getWidth() : 1;
+
   if (appearance.isNull()) {
     ca = opacity;
 


More information about the poppler mailing list