On Tue, 2008-10-14 at 16:07 -0400, Jeremy Moles wrote:
> On Tue, 2008-10-14 at 21:59 +0200, Gerwin de Haan wrote:
> > Jeremy, if you have an hour to spare, that would be great!
> > 
> > After I replied to Alessandro to give osgCairo a try I did so myself.
> > Works like a charm, but the loading of both svg and pdfs is not
> > directly supported by cairo itself, is it?
> > For svg, I recall to have played around with a seperate svg parser
> > which renders to cairo.
> > For pdf, it seems one needs a pdf parser (e.g. poppler).
> > What's your thought on that?
> 
> Yes, you're exactly right.
> 
> I'm about 30 minutes away from having Poppler support in osgCairo in the
> OSG'ish form of:
> 
> -----------------------------------------
> 
> #incude <osgCairo/ReadFile>
> 
> osgCairo::ImageVector iv;
> 
> if(osgCairo::readImagePDF("foo.pdf", iv, 256, 256)) {
>       ...
> }
> 
> -----------------------------------------
> 
> But this does require poppler. I'll also add support for libsrvg and
> whatnot as I need it, but I kind write osgCairo as I go to support
> osgWidget and osgPango. The good thing, though, is that once you get the
> PDF's into the osgCairo::Image object, nothing stops you from editing
> them any way you want. :)
> 
> >From what I read, poppler should work in Windows too, but I can't say
> for sure how hard that would be.

Okay, so, from the man who brought you all kinds of other useless
software comes PDF rendering directly to an osg::Image (more
specifically, osgCairo::Image) using osgCairo + poppler.

Obligatory Screenshot:

        http://the-bob.org/~jlmoles/osgCairo-pdf.png

        ...this is part of the GLSL presentation Mike gave...

Of course, it's just a quick hack, but the power is there. And... I take
payment in the form of linkedin referrals! :)

> > On Tue, Oct 14, 2008 at 7:41 PM, Jeremy Moles <[EMAIL PROTECTED]> wrote:
> > > On Sat, 2008-10-11 at 22:30 +0200, alessandro terenzi wrote:
> > >> I would like to read pdf documents, process them in some way, and
> > >> finally render them inside my osg application.
> > >> How can I do it in osg?
> > >
> > > I can add this power to osgCairo if you want; would take about an hour.
> > >
> > >> Thank you. Best regards.
> > >> Alessandro
> > >>
> > >> _______________________________________________
> > >> osg-users mailing list
> > >> osg-users@lists.openscenegraph.org
> > >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > >
> > > _______________________________________________
> > > osg-users mailing list
> > > osg-users@lists.openscenegraph.org
> > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > >
> > _______________________________________________
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > 
> 
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to