Wrong Font Name, Size, and Fill Color when Using Aspose.Slides for Java (1733)

Hi I am having some issues with this presentation : _TBK_2014.ppt.zip (20.3 KB)

We get on the multiple slides issues with font name, font size and fill colour and in the some issues with shadow

code:

String path = "_TBK_2014.ppt";
Presentation presentation = new Presentation(path);
ISlideCollection slides = presentation.getSlides();
   //first slide
ISlide slide = slides.get_Item(0);
IShapeCollection shapes = slide.getShapes();
AutoShape autoShape = (AutoShape) shapes.get_Item(1);
IParagraph paragraph = autoShape.getTextFrame().getParagraphs().get_Item(0);
System.out.println(paragraph.getText());
IParagraphFormatEffectiveData paragraphFromatEffective = paragraph.createParagraphFormatEffective();
IPortionFormatEffectiveData defaultPortionFormat = paragraphFromatEffective.getDefaultPortionFormat();
IFillFormatEffectiveData fillFormat = defaultPortionFormat.getFillFormat();

System.out.println("font name " + defaultPortionFormat.getLatinFont().getFontName());
System.out.println("size: " + defaultPortionFormat.getFontHeight());
System.out.println("fillcolor: " + fillFormat.getSolidFillColor());
System.out.println("================");
slide = slides.get_Item(3);
shapes = slide.getShapes();
Table table = (Table) shapes.get_Item(2);
ICell cell = table.get_Item(0, 0);
System.out.println(cell.getTextFrame().getParagraphs().get_Item(1).getText());
paragraph = cell.getTextFrame().getParagraphs().get_Item(1);
paragraphFromatEffective = paragraph.createParagraphFormatEffective();
defaultPortionFormat = paragraphFromatEffective.getDefaultPortionFormat();
fillFormat = defaultPortionFormat.getFillFormat();

System.out.println("font name " + defaultPortionFormat.getLatinFont().getFontName());
System.out.println("size: " + defaultPortionFormat.getFontHeight());
System.out.println("fillcolor: " + fillFormat.getSolidFillColor());

System.out.println(paragraph.getPortions().get_Item(0).createPortionFormatEffective().getEffectFormat()
	.getInnerShadowEffect() == null);
System.out.println(paragraph.getPortions().get_Item(0).createPortionFormatEffective().getEffectFormat()
	.getOuterShadowEffect() == null);

On slide one we get wrong font size and wrong solid fill colour.
On slide four we get wrong font name , font size, fill colour and cant get the shadow .
We get that issues on slide 5,7,9,10

Can you please check this out?

Thanks
Zeljko.

@Zeljko,

I have observed the information shared by you and request you to please first try using Aspose.Slides for Java 18.6 on your end. If there is still an issue then please share the highlighted issues in the form of snapshot so that we may observe them. Secondly, please also provide a complete working example that we may use to reproduce the issue on our end.

Here is the code i used for slides 1,4,5,7. The basicly same thing happens also on the slides 9 and 10, (slides that have a table). You can see the screen shots.
slide1.JPG (97.5 KB)
Slide4.JPG (84.0 KB)
Slide7.JPG (120.6 KB)
Slide5.JPG (86.8 KB)

code :
@Test

 public void slide1() {
String path = "_TBK_2014.ppt"; 
Presentation presentation = new Presentation(path);
ISlideCollection slides = presentation.getSlides();

ISlide slide = slides.get_Item(0);
IShapeCollection shapes = slide.getShapes();
AutoShape autoShape = (AutoShape) shapes.get_Item(1);
IParagraph paragraph = autoShape.getTextFrame().getParagraphs().get_Item(0);

IPortion portion = paragraph.getPortions().get_Item(0);
System.out.println(portion.getText());
assertEquals(
	"Регионална здравна инспекция Враца осъществява държавната здравна политика на територията на област Враца и държавен здравен контрол за спазване на изискванията за защита на лицата от въздействието на йонизиращи лъчения на територията на следните области: Враца, Видин, Монтана, Плевен и Ловеч",
	portion.getText());
IPortionFormatEffectiveData portionFormatEffective = portion.createPortionFormatEffective();
assertEquals(new Color(255, 255, 204), portionFormatEffective.getFillFormat().getSolidFillColor());
assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());
}

@Test
public void slide4() {

String path = "_TBK_2014.ppt";
Presentation presentation = new Presentation(path);
ISlideCollection slides = presentation.getSlides();

ISlide slide = slides.get_Item(3);

IShapeCollection shapes = slide.getShapes();
Table table = (Table) shapes.get_Item(2);
ICell cell = table.get_Item(0, 0);
IParagraph paragraph = cell.getTextFrame().getParagraphs().get_Item(1);
IPortion portion = paragraph.getPortions().get_Item(0);
assertEquals("Област", portion.getText());
IPortionFormatEffectiveData portionFormatEffective = portion.createPortionFormatEffective();
assertEquals(new Color(234, 234, 234), portionFormatEffective.getFillFormat().getSolidFillColor());
assertEquals("Verdana", portionFormatEffective.getLatinFont().getFontName());
assertEquals(28, portionFormatEffective.getFontHeight(), 0);
assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());

cell = table.get_Item(1, 0);
paragraph = cell.getTextFrame().getParagraphs().get_Item(1);
portion = paragraph.getPortions().get_Item(0);
assertEquals("Година", portion.getText());
portionFormatEffective = portion.createPortionFormatEffective();
portionFormatEffective = portion.createPortionFormatEffective();
assertEquals(new Color(234, 234, 234), portionFormatEffective.getFillFormat().getSolidFillColor());
assertEquals("Verdana", portionFormatEffective.getLatinFont().getFontName());
assertEquals(28, portionFormatEffective.getFontHeight(), 0);
assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());
}

@Test
public void slide5() {

String path = "_TBK_2014.ppt";
Presentation presentation = new Presentation(path);
ISlideCollection slides = presentation.getSlides();

ISlide slide = slides.get_Item(4);

IShapeCollection shapes = slide.getShapes();
Table table = (Table) shapes.get_Item(2);
ICell cell = table.get_Item(0, 0);
IParagraph paragraph = cell.getTextFrame().getParagraphs().get_Item(1);
IPortion portion = paragraph.getPortions().get_Item(0);
assertEquals("Област", portion.getText());
IPortionFormatEffectiveData portionFormatEffective = portion.createPortionFormatEffective();
assertEquals(new Color(234, 234, 234), portionFormatEffective.getFillFormat().getSolidFillColor());
assertEquals("Verdana", portionFormatEffective.getLatinFont().getFontName());
assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());

cell = table.get_Item(1, 0);
paragraph = cell.getTextFrame().getParagraphs().get_Item(1);
portion = paragraph.getPortions().get_Item(0);
assertEquals("Година", portion.getText());
portionFormatEffective = portion.createPortionFormatEffective();
portionFormatEffective = portion.createPortionFormatEffective();
assertEquals(new Color(234, 234, 234), portionFormatEffective.getFillFormat().getSolidFillColor());
assertEquals("Verdana", portionFormatEffective.getLatinFont().getFontName());
assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());
}

@Test
public void slide7() {

String path = "_TBK_2014.ppt";
Presentation presentation = new Presentation(path);
ISlideCollection slides = presentation.getSlides();

ISlide slide = slides.get_Item(6);

IShapeCollection shapes = slide.getShapes();
Table table = (Table) shapes.get_Item(1);
ICell cell = table.get_Item(0, 0);
IParagraph paragraph = cell.getTextFrame().getParagraphs().get_Item(2);
IPortion portion = paragraph.getPortions().get_Item(0);
assertEquals("Област", portion.getText());
IPortionFormatEffectiveData portionFormatEffective = portion.createPortionFormatEffective();
 assertEquals(new Color(234, 234, 234),
 portionFormatEffective.getFillFormat().getSolidFillColor());
 assertEquals("Verdana",
 portionFormatEffective.getLatinFont().getFontName());
 assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());

paragraph = cell.getTextFrame().getParagraphs().get_Item(3);
portion = paragraph.getPortions().get_Item(0);
assertEquals("Враца", portion.getText());
portionFormatEffective = portion.createPortionFormatEffective();
assertEquals(new Color(234, 234, 234), portionFormatEffective.getFillFormat().getSolidFillColor());
assertEquals("Verdana", portionFormatEffective.getLatinFont().getFontName());
assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());

cell = table.get_Item(0, 1);
paragraph = cell.getTextFrame().getParagraphs().get_Item(0);
portion = paragraph.getPortions().get_Item(0);
assertEquals("1.Бел.ТБК", portion.getText());
assertEquals("Verdana", portionFormatEffective.getLatinFont().getFontName());
assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());

paragraph = cell.getTextFrame().getParagraphs().get_Item(3);
portion = paragraph.getPortions().get_Item(0);
assertEquals("2.Извън бел.ТБК", portion.getText());
assertEquals("Verdana", portionFormatEffective.getLatinFont().getFontName());
assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());

paragraph = cell.getTextFrame().getParagraphs().get_Item(5);
portion = paragraph.getPortions().get_Item(0);
assertEquals("3.Акт.ТБК-всичко", portion.getText());
assertEquals(new Color(234, 234, 234), portionFormatEffective.getFillFormat().getSolidFillColor());
assertEquals("Verdana", portionFormatEffective.getLatinFont().getFontName());
assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());
}

Note: All assertion fail but it should not.
I used slides 18.6

@Zeljko,

I have worked with source files shared by you and have been able to observe issue. A ticket with ID SLIDESJAVA-37140 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with issue so that you may be automatically notified once issue will be fixed.

Hi there!

Is there any update regarding above issue?

Best regards,
Nenad

@zpredojevic,
The issue is still open. Unfortunately, I don’t have any additional information. We apologize for any inconvenience caused.