Bugzilla – Attachment 101582 Details for
Bug 156300
CUPS support for poppler
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
Poppler fix to suppress hidden annotions
poppler-0.5.4_renderHiddenAnnotations.patch (text/x-diff), 1.82 KB, created by
Klaus Singvogel
on 2006-10-16 15:30:02 UTC
(
hide
)
Description:
Poppler fix to suppress hidden annotions
Filename:
MIME Type:
Creator:
Klaus Singvogel
Created:
2006-10-16 15:30:02 UTC
Size:
1.82 KB
patch
obsolete
>diff -Naur poppler-0.5.4.org/poppler/Gfx.cc poppler-0.5.4/poppler/Gfx.cc >--- poppler-0.5.4.org/poppler/Gfx.cc 2006-10-09 09:40:58.000000000 +0200 >+++ poppler-0.5.4/poppler/Gfx.cc 2006-10-09 09:41:17.000000000 +0200 >@@ -3318,18 +3318,36 @@ > void Gfx::doAnnot(Object *str, double xMin, double yMin, > double xMax, double yMax) { > Dict *dict, *resDict; >- Object matrixObj, bboxObj, resObj; >+ Object matrixObj, bboxObj, resObj, flagsObj;; > Object obj1; > double m[6], bbox[6], ictm[6]; > double *ctm; > double formX0, formY0, formX1, formY1; > double annotX0, annotY0, annotX1, annotY1; > double det, x, y, sx, sy; >- int i; >+ int i, flags; > > // get stream dict > dict = str->streamGetDict(); > >+ // get annotation flags and only print annotations that are hidden or >+ // don't have the print bit set. >+ dict->lookup("F", &flagsObj); >+ if (flagsObj.isInt()) { >+ flags = flagsObj.getInt(); >+ } else { >+ // Print anything that doesn't have any flags set... >+ flags = 4; >+ } >+ flagsObj.free(); >+ >+// fprintf(stderr, "DEBUG: doAnnot found annotation with flags = %x\n",flags); >+ >+ if (!out->renderHiddenAnnotations() && ((flags & 2) == 2 || (flags & 4) == 0)) { >+ // Don't print hidden or no-print annotations... >+ return; >+ } >+ > // get the form bounding box > dict->lookup("BBox", &bboxObj); > if (!bboxObj.isArray()) { >diff -Naur poppler-0.5.4.org/poppler/OutputDev.h poppler-0.5.4/poppler/OutputDev.h >--- poppler-0.5.4.org/poppler/OutputDev.h 2006-10-09 09:40:58.000000000 +0200 >+++ poppler-0.5.4/poppler/OutputDev.h 2006-10-09 09:41:17.000000000 +0200 >@@ -76,6 +76,7 @@ > > // Should the page be rendered > virtual GBool renderPage(int /*pageNum*/) { return gTrue; } >+ virtual GBool renderHiddenAnnotations() { return gTrue; } > > // Start a page. > virtual void startPage(int /*pageNum*/, GfxState * /*state*/) {}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 156300
:
101581
| 101582 |
101584
|
101585