Have a problem with PresentationFactory::getPresentationText::getSlidesText

Hi All,

PresentationFactory::getPresentationText::getSlidesText return an array of [ISlideText] contains a presentation’s text. But if a slide just has e.g. charts or images (there are no text element) the ISlideText[] array does not included that slide.

Is this a proper operation?

This behavior caused us a problem because we get notes, master and layout text from array of ISlideText for all slides in the presentation.

Thanks in advance!

András Weinacht

@weinachta-1,
Could you share a code example for our investigation, please? Also, we need to know the version of Aspose.Slides library that you are using.

Hi Andrey_Potapov,

Sharing the code is not so trivial because:

  • we have a complex system with Aspose.Slides. The code snippet itself won’t work.
  • we use Aspose.Slides Java with PHP/JavaBridge.

Here is a code snippet:
$presentationText .= java_values($this->presentation->getPresentationText()->getSlidesText()[$slideNumber - 1]->getText());
$presentationText .= java_values($this->presentation->getPresentationText()->getSlidesText()[$slideNumber - 1]->getLayoutText());
$presentationText .= java_values($this->presentation->getPresentationText()->getSlidesText()[$slideNumber - 1]->getMasterText());
$presentationText .= java_values($this->presentation->getPresentationText()->getSlidesText()[$slideNumber - 1]->getNotesText());

The ISlideText[] doesn’t exists on all slides in the presentation in that case as I mentioned.

I attached two example templates.

design-file_ISlideText.zip (198.5 KB)

Thanks in advance!

András

@weinachta-1,
The behavior you described when getting a text array is correct. But I have logged the issue in our tracking system with ID SLIDESJAVA-38436 so that it became possible to get a text array, the size of which is equal to the number of slides in the presentation. You will be notified when it is solved.

The issues you have found earlier (filed as SLIDESJAVA-38436) have been fixed in this update.