Thank you. I ran the code with jdk 5.0 and it worked. Now I have another problem. I am trying to read the attached PPT and it returns the placeholders as null.
Below is the code I am using to read this slide.
try
{
MSPowerPointReader mspowerpointreader = new MSPowerPointReader();
FileInputStream fIS = new FileInputStream(new File("C:\\Projects\\MSOfficeParser\\A.PPT"));
Presentation pres = new Presentation(fIS);
Slides slides = pres.getSlides();
int size = slides.size();
System.out.println("Size "+size);
if (size > 0)
{
for(int i=0;i<size;i++)
{
Slide singleSlide = slides.get(i);
processSlide(singleSlide);
}
}
}
catch(Exception e)
{
e.printStackTrace();
}
}
public static void processSlide(Slide singleSlide)
{
try
{
Placeholders placeHolders = singleSlide.getPlaceholders();
System.out.println(singleSlide.getName());
System.out.println("TAGS " +singleSlide.getTags());
Tags tags = singleSlide.getTags();
int tagSize = tags.size();
for (int j=0;j<tagSize;j++)
{
System.out.println("Tag "+tags.getTagName(j));
}
int size = placeHolders.size();
if(size > 0)
{
for (int i=0;i<size;i++)
{
TextHolder textHolder = (TextHolder)placeHolders.get(i);
if(textHolder !=null)
{
System.out.println("Text in Place Holder " + i + "is " +
textHolder.getText());
}
}
}
}
catch(Exception e)
{
e.printStackTrace();
}
Please let me know what I am missing.