You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Túlio Severiano <tu...@gmail.com> on 2010/06/05 00:05:02 UTC

Power Point Viewer

I'm building a Power point viewer. That can also convert the slider in a JPG
or PNG.

I am using this example. But it does not display the background or text
formatting. Any help?

http://poi.apache.org/slideshow/how-to-shapes.html#Render
<http://poi.apache.org/slideshow/how-to-shapes.html#Render>

FileInputStream is = new FileInputStream("slideshow.ppt");
        SlideShow ppt = new SlideShow(is);
        is.close();

        Dimension pgsize = ppt.getPageSize();

        Slide[] slide = ppt.getSlides();
        for (int i = 0; i < slide.length; i++) {

            BufferedImage img = new BufferedImage(pgsize.width,
pgsize.height, BufferedImage.TYPE_INT_RGB);
            Graphics2D graphics = img.createGraphics();
            //clear the drawing area
            graphics.setPaint(Color.white);
            graphics.fill(new Rectangle2D.Float(0, 0, pgsize.width,
pgsize.height));

            //render
            slide[i].draw(graphics);

            //save the output
            FileOutputStream out = new FileOutputStream("slide-"  +
(i+1) + ".png");
            javax.imageio.ImageIO.write(img, "png", out);
            out.close();
        }

-- 
Atenciosamente,
Túlio Sérgio de Paula Severiano
www.leafmob.com
http://twitter.com/tulioseveriano

Re: Power Point Viewer

Posted by Túlio Severiano <tu...@gmail.com>.
In the file poi-src-3.6-20091214.tar.gz

folder poi-src-3.6-20091214 \ poi-3.6 \ test-data \ slideshow

Missing_core_records.ppt that contains the file I'm using as an example of
studies.

I can not get the background, only solid colors.

Anyway tank,

Regards,
Tulio

2010/6/4 David Fisher <df...@jmlafferty.com>

> Tulio,
>
> On Jun 4, 2010, at 4:07 PM, Nick Burch wrote:
>
> > On Fri, 4 Jun 2010, Túlio Severiano wrote:
> >> I am using this example. But it does not display the background or text
> formatting. Any help?
> >>
> >> http://poi.apache.org/slideshow/how-to-shapes.html#Render
> >
> > I suspect that these are bits that still need work. Your best bet is to
> identify the shape objects that make up the bits that aren't appearing, then
> add / update their draw methods to implement the missing functionality.
> >
> > Do please share you patches when you get it working! :)
>
> This part of the api is about to get a little attention as I am scratching
> an itch in this same area.
>
> Please share what shapes are not working correctly for you.
>
> If it is possible please attach some simple examples of slides that don't
> render properly to a bugzilla entry.
>
> Regards,
> Dave
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>


-- 
Atenciosamente,
Túlio Sérgio de Paula Severiano
www.leafmob.com
http://twitter.com/tulioseveriano

Re: Power Point Viewer

Posted by David Fisher <df...@jmlafferty.com>.
Tulio,

On Jun 4, 2010, at 4:07 PM, Nick Burch wrote:

> On Fri, 4 Jun 2010, Túlio Severiano wrote:
>> I am using this example. But it does not display the background or text formatting. Any help?
>> 
>> http://poi.apache.org/slideshow/how-to-shapes.html#Render
> 
> I suspect that these are bits that still need work. Your best bet is to identify the shape objects that make up the bits that aren't appearing, then add / update their draw methods to implement the missing functionality.
> 
> Do please share you patches when you get it working! :)

This part of the api is about to get a little attention as I am scratching an itch in this same area.

Please share what shapes are not working correctly for you.

If it is possible please attach some simple examples of slides that don't render properly to a bugzilla entry.

Regards,
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Power Point Viewer

Posted by Nick Burch <ni...@alfresco.com>.
On Fri, 4 Jun 2010, Túlio Severiano wrote:
> I am using this example. But it does not display the background or text 
> formatting. Any help?
>
> http://poi.apache.org/slideshow/how-to-shapes.html#Render

I suspect that these are bits that still need work. Your best bet is to 
identify the shape objects that make up the bits that aren't appearing, 
then add / update their draw methods to implement the missing 
functionality.

Do please share you patches when you get it working! :)

Nick