[Xcb] pdf viewer

Vincent Torri Vincent.Torri at iecn.u-nancy.fr
Wed May 10 12:30:55 PDT 2006


Hey,

Jamey told me that an xcb based pdf viewer would be cool. Poppler is a
(c++) library that parses and render pdf content. Here is xcbpdf :)

I told Jamey that i would not be able to find time to code it within a few
weeks. Finally, i could not resist. I've very quickly code that minimalist
pdf viewer. It's not perfect, in particular, the colors. All the ways I
have tried are quite slow. Right now the speed is correct, but the colors
are ugly.

If you want to test :

1) install poppler :

cvs -d :pserver:anoncvs at cvs.freedesktop.org:/cvs/poppler co poppler

2) Compile it with that option to configure :

./configure --enable-xpdf-headers
make
make install

3) Compile xcbpdf :

g++ -g -Wall -o xcbpdf xcbpdf.c `pkg-config --cflags --libs poppler xcb
xcb-aux xcb-image`

yeah, I know, I have to use g++ :)

Finally, you can use the following keys to naviguate :

esc         : exit
right arrow : page++
left arrow  : page--
page up     : page -= 10
page down   : page += 10

that's all :)

fell free to hack it. Comment are of course welcome :)

Vincent
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xcbpdf.c
Type: text/x-csrc
Size: 7668 bytes
Desc: 
Url : http://lists.freedesktop.org/archives/xcb/attachments/20060510/59019a6d/xcbpdf.c


More information about the Xcb mailing list