Portion format problem with new 1.8.5.0 version

Hi, I have again problem with portion formatting in new version. Here is code snippet:
InputStream inputStream = getClass().getClassLoader().getResourceAsStream(“testFile”);

Presentation presentation = null;

try {
presentation = new Presentation(inputStream);
} catch (PptException e) {
e.printStackTrace();
}

Slides slides = presentation.getSlides();

Slide slide = slides.get(0);

Placeholders placeholders = slide.getPlaceholders();

TextHolder textHolder = (TextHolder) placeholders.get(0);

Paragraphs paragraphs = textHolder.getParagraphs();

Paragraph paragraph = paragraphs.get(0);

Portion portion = paragraph.getPortions().get(0);

System.out.print(portion.getText())

System.out.print(portion.isFontItalic()); // returns false although text is italic

Can you please look at this asap, I am in a space gap because of this.

Thanks, Ivica.

Hello Ivica,

We have found the problem and fixed it in .Net version.
It will be moved also to Java asap. Thank you for all provided presentations.

Bullets work fine on all test presentations but there are 2 presentations
that still have problem with bold/italic properties.

We will release new version of Aspose.Slides for JAVA in next couple of days

Hi, I have just installed new 1.8.6.0 version and I still have problem with portion format. In the attachments is my test presentation. Here is code snippet:
String path = “aspose/slides/portion-format-short.ppt”;

InputStream inputStream = getClass().getClassLoader().getResourceAsStream(path);

Presentation presentation = null;

try {
presentation = new Presentation(inputStream);
} catch (PptException e) {
e.printStackTrace();
}

Slides slides = presentation.getSlides();

Slide slide = slides.get(0);

Placeholders placeholders = slide.getPlaceholders();

TextHolder textHolder = (TextHolder) placeholders.get(0);

Paragraphs paragraphs = textHolder.getParagraphs();

Paragraph paragraph = paragraphs.get(0);

Portion portion = paragraph.getPortions().get(0);

System.out.print(portion.isFontItalic()); // tells that it is not italic

Can you please check it out.

Thanks, Ivica.

Hi, there are 3 more files that have same problem. Hope that they will help you.

Thanks, Ivica.

Hi,

Here are the results of Aspose.Slides for JAVA 1.8.6.0.

http://www.aspose.com/community/files/51/file-format-components/aspose.slides/entry141287.aspx

SAVE AS... command means, the presentation has been opened in MS-PowerPoint and saved back with SAVE AS... menu command with different name and tested.

It is needed to ensure that presentation is not damaged.

  • basic business warehouse (bw) navigation_SOURCE-de.ppt is ok after SAVE AS... command exception is 16th slide.
  • portion-format-short.ppt is not ok, even after SAVE AS... command
  • problem1.ppt is not ok, even after SAVE AS... command.
  • problem2.ppt is ok.
  • problem3.ppt is ok.

Hi,

I am not sure what are you telling me in the previous post. Is problem in files?
And if it is, what do you mean by problem2 and problem3 is ok?

Regards, Ivica.

I meant, the file namely problem3.ppt you attached earlier, works fine with Aspose.Slides.

Hi again. You told me that aspose 1.8.6.0 works fine with problem3.ppt.

Please execute simple code:
Presentation presentation = null;

try {
presentation = new Presentation(inputStream);
} catch (PptException e) {
e.printStackTrace();
}

Slides slides = presentation.getSlides();

Slide slide = slides.get(0);

Placeholders placeholders = slide.getPlaceholders();

TextHolder textHolder = (TextHolder) placeholders.get(0);

Paragraphs paragraphs = textHolder.getParagraphs();

Paragraph paragraph = paragraphs.get(0);

Portion portion = paragraph.getPortions().get(0);

System.out.print(portion.getText()); // Themenfelder

System.out.print(portion.isFontBold()); // this is false and this text is bold in presentations

Please let me know what is the problem.

Regards, Ivica.

Dear Ivica,

You are right. I tested them differently. I took their thumbnails and they were right because they retrieve text and display them in image.

Please rectify this line of code

//incorrect
Slide slide = slides.get(0);

//correct, it will retrieve the first normal slide
Slide slide = presentation.getSlideByPosition(1);

I have requested the team to fix it with other formatting related issues. Thank you for your time and patience.