[gnome-love]Xpdf tasklet ...



Hi,

        So. I have a task of intermediate difficulty, currently there is a
CVS module 'xpdf' that contains a port of the xpdf application to the
gnome platform.

        Here is how it works approximately:

        1. Xpdf loads the pdf through a Bonobo_Stream
        2. Xpdf decodes the pdf
        3. Xpdf renders the pdf using the abstract OutputDev class
                - OutputDev has a postscript like API.
        4. GOutputDev is implemented using the Gdk primatives to
        render the output to a Gtk+ drawing area.

        So, there are several problems with this approach, and we can get
a beautifuly crisp, printing, PDF viewing bonobo component with very
little effort if we do the following:

        Re-implement stage 4.

        Use instead the gnome-print API see libgnomeprint/gnome-print.h, 
print to a gnome-print-preview context.

        The advantages of doing this are:

                * Faster rendering - currently xpdf allocates a vast X
        resource and renders into it for fast scrolling, this is slow.
                * Better zooming - since we don't have to allocate an
        X resource of size x*y*zoom pixels we can zoom rapidly.
                * Full anti-aliasing & spline fonts,
                * Trivial, quality bonobo printing support.

        The task should not be massively difficult since, the OutputDev
API is very similar in concept to the libgnomeprint API.

        Unfortunately the ability to work in a mixed C / C++ context is
neccessary, and a fair level of programming competance. Also, the ability
to peer into the pit of horrificly tasteless programming style (xpdf)
whilst keeping ones mind in the sanity and cleanliness of good style (
such as gnome-print ) is vital.

        A good place to start would be by building CVS module 'xpdf', and
reading xpdf/xpdf/OutputDev.h and checking out CVS module 'gnome-print'
and reading gnome-print/libgnomeprint/gnome-print.g - code reading is an
excellent discipline to get into ... why not start now :-)

        Anyhow, any interested people should mail me / the list so that
everyone can learn things.

        Regards,

                Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]