How should I implement in android Presentation slide in images file?

902 views Asked by At

I would like to convert my presentation file (.ppt) into images then put it on app. It just just plain presentation with the ability for me to swipe left or right to change slides (images in this case). What method is the easiest? viewflipper? Picture galery? or any SDK ready for this? Sample code or URL will be great as I am still learning.

2

There are 2 answers

1
Pawan asati On

I think it will help you

SlideShow ppt = new SlideShow(new HSLFSlideShow("slideshow.ppt"));

  //extract all pictures contained in the presentation

  PictureData[] pdata = ppt.getPictureData();

  for (int i = 0; i < pdata.length; i++){

    PictureData pict = pdata[i];

    // picture data
    byte[] data = pict.getData();

    int type = pict.getType();

    String ext;

    switch (type){

      case Picture.JPEG: ext=".jpg"; break;

      case Picture.PNG: ext=".png"; break;

      case Picture.WMF: ext=".wmf"; break;

      case Picture.EMF: ext=".emf"; break;

      case Picture.PICT: ext=".pict"; break;

      default: continue;

    }

    FileOutputStream out = new FileOutputStream("pict_"+i + ext);

      out.write(data);

      out.close();

  }
0
Paresh Dudhat On

I think you should go with ViewPager. native control in android. You can find sample code as well as more detail about control in this link.