[Xcb] pdf viewer

Barton C Massey bart at cs.pdx.edu
Wed May 10 12:59:08 PDT 2006


You're awesome, Vincent.  Big fun.  I'll give it a try and
let you know what I figure out.

	Bart

In message <Pine.LNX.4.51.0605102121080.31279 at cartan.iecn.u-nancy.fr> you wrote:
>   This message is in MIME format.  The first part should be readable text,
>   while the remaining parts are likely unreadable without MIME-aware tools.
>   Send mail to mime at docserver.cac.washington.edu for more info.
> 
> --851511594-1685113658-1147289455=:31279
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> 
> 
> 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
> --851511594-1685113658-1147289455=:31279
> Content-Type: TEXT/x-csrc; name="xcbpdf.c"
> Content-Transfer-Encoding: BASE64
> Content-ID: <Pine.LNX.4.51.0605102130550.31279 at cartan.iecn.u-nancy.fr>
> Content-Description: 
> Content-Disposition: attachment; filename="xcbpdf.c"
> 
> Ly8gZysrIC1nIC1XYWxsIC1vIHhjYnBkZiB4Y2JwZGYuYyBgcGtnLWNvbmZp
> ZyAtLWNmbGFnc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0KUERGRG9jICAgICAgICAgICpwZGZfZG9jOw0KOjpQ
> YWdlICAgICAgICAgICpwZGZfcGFnZTsNCmludCAgICAgICAgICAgICAgcGFn
> ZSA9IDA7DQpkb3VibGUgICAgICAgICAgIGhzY2FsZSA9IDEuMDsNCmRvdWJs
> ZSAgICAgICAgICAgdnNjYWxlID0gMS4wOw0KDQoNCi8vIFhDQiBmdW5jdGlv
> bnMNCnN0YXRpYyBpbnQNCl94Y2JfaW5pdCAoKQ0Kew0KICBpbnQgc2NyZWVu
> X251bTsNCiAgQ0FSRDMyIG1hc2s7DQogIENBUkQzMiB2YWx1ZXNbM107DQog
> IENBUkQzMiB2YWxnY1syXTsNCg0KICBjID0gWENCQ29ubmVjdCAoMCwgJnNj
> cmVlbl9udW0pOw0KICBpZiAoIWMpDQogICAgcmV0dXJuIDA7DQoNCiAgc2Ny
> ZWVuID0gWENCQXV4R2V0U2NyZWVuIChjLCBzY3JlZW5fbnVtKTsNCiAgZGVw
> dGggPSBYQ0JBdXhHZXREZXB0aCAoYywgc2NyZWVuKTsNCg0KICB3aW4ud2lu


More information about the Xcb mailing list