El lun, 01-06-2009 a las 14:45 +0200, Carlos Garcia Campos escribió: > Hi all, > > I'm working on adding support for creating new annotations that can be > added to any document. The idea is just adding new constructors to the > existing Annot objects that don't require an annot dict, and setters for > the annots attributes. I don't know what to do with appearance streams, > though. Ideally, appearance streams should be built by the poppler core > to avoid duplicated code in the frontends. But appearance streams of > annotations are actually form XObjects, they are not usually a bitmap, > but a sequence of instructions to draw the annotations. For example: > > q > g 0.5 > G 0.75 > i 0 > M 4 > m 2.0938 18.2158 > l 2.0938 0.5 > l 12.0962 0.5 > l 17.1577 5.5615 > l 17.1577 18.2158 > l 2.0938 18.2158 > h > B > rg 1 1 0 > G 0 > m 0.5 19.8096 > l 0.5 2.0938 > l 10.5024 2.0938 > l 15.564 7.1553 > l 15.564 19.8096 > l 0.5 19.8096 > h > B > m 10.46 2.1338 > l 10.46 7.167 > l 15.5225 7.208 > S > m 4.0537 15.9824 > l 12.0537 15.9824 > S > m 4.0537 12.9824 > l 12.0537 12.9824 > S > m 4.0537 9.9824 > l 8.9912 9.9824 > S > Q > > This is the appearance stream used by acroread to render Note icons used > in Text annotations. In the case of Text annotations we should provide > predefined appearance streams for the well-known icons: > > - Comment > - Key > - Note > - Help > - NewParagraph > - Paragraph > - Insert > > but for the other annots we need to figure out a way to set an > appearance stream. I'm afraid it's not going to be possible to build the > streams in the core, so the api might be just Annot::setAP (Stream > *str); and build the appearance streams in the frontends or even in the > viewers.
well, there's another possibility: don't provide any appearance stream at all, like this PDF: http://www.pdfill.com/example/pdf_commenting_new.pdf The problem is that it doesn't work with current poppler, because we are only drawing annotations that have an AP (which is something we should fix anyway) > any other idea? am I missing something? any artist willing to write > icons for Text annotations? :-P > > _______________________________________________ > poppler mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/poppler -- Carlos Garcia Campos [email protected] [email protected] http://carlosgc.linups.org PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
signature.asc
Description: Esta parte del mensaje está firmada digitalmente
_______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
