Portion Format

Hi,


I start using new 15.4.0 aspose.slide version and I have issue with portion format. Here is test and attached presentation.For some parts of text I don’t get right fontHeight and fontName. How to get is text underlined or not?
public void test() {
Presentation pres = new Presentation(
“/AsposeTest.pptx”);
for (ISlide slide : pres.getSlides()) {
for (IShape shp : slide.getShapes())
if (shp.getPlaceholder() != null) {
// Change the text of each placeholder
for (IParagraph paragraph : ((IAutoShape) shp)
.getTextFrame().getParagraphs()) {
for (IPortion portion : paragraph.getPortions()) {
System.out.println("PTEXT: " + portion.getText());
System.out.println("FontHeight: "
+ portion.getPortionFormat()
.getFontHeight());
if (portion.getPortionFormat().getLatinFont() != null)
System.out.println("FontNameLatin: "
+ portion.getPortionFormat()
.getLatinFont().getFontName());
System.out.println("FontNameEA: "
+ portion.getPortionFormat()
.getEastAsianFont());
System.out.println("FontNameSymbol: "
+ portion.getPortionFormat()
.getSymbolFont());
System.out.println("Bold: "
+ portion.getPortionFormat().getFontBold());
System.out.println("Italic: "
+ portion.getPortionFormat()
.getFontItalic());
System.out.println("UnderlineFile: "
+ portion.getPortionFormat()
.getUnderlineFillFormat()
.getFillType());
System.out.println(“UnderlineLine: "
+ portion.getPortionFormat()
.getUnderlineLineFormat());
System.out.println(“Color: "
+ portion.getPortionFormat()
.getFillFormat()
.getSolidFillColor());

System.out.println(”++++++++++++++++++++++++”);
}
}

}
}
}

Can You help me with this?

Thanks
Best regards

Hi Djordje,


I have observed the code and presentation file shared by you. I have made some necessary changes in the code and I request you to please try using following sample code on your end and then share the feedback with us.

Presentation pres = new Presentation(“D://test.pptx”);
for (ISlide slide : pres.getSlides()) {
for (IShape shp : slide.getShapes())
if (shp.getPlaceholder()!= null) {
// Change the text of each placeholder
for (IParagraph paragraph : ((IAutoShape) shp)
.getTextFrame().getParagraphs()) {
for (IPortion portion : paragraph.getPortions()) {
if ((portion.getText().length()!=0)){
System.out.println("PTEXT: " + portion.getText());
System.out.println("FontHeight: "+ portion.createPortionFormatEffective().getFontHeight());
if (portion.getPortionFormat().getLatinFont() != null)
System.out.println("FontNameLatin: "+ portion.getPortionFormat().getLatinFont().getFontName());
if (portion.createPortionFormatEffective().getFontBold()){
System.out.println("Bold: "+ “Yes messgae”);
}
else
{
System.out.println("Bold: "+ “No message”);
}
if (portion.createPortionFormatEffective().getFontItalic()){
System.out.println("Italic: "+ “Yes message”);
}
else
{
System.out.println("Italic: "+ “No message”);
}
if (portion.createPortionFormatEffective().isHardUnderlineLine()){
System.out.println("Underline: "+ “Yes message”);
}
else
{
System.out.println("Underline: "+ “No message”);
}
System.out.println(“Color: “+ portion.createPortionFormatEffective().getFillFormat().getSolidFillColor().toString());

System.out.println(”++++++++++++++++++++++++”);
}
}
}

}
}
}

I hope this will be helpful. Please share if I may help you further in this regard.

Best Regards,

Hi,


thank you for answer, this helps me, but for text: “Aspose test” and “First slide” I don’t get font name even if I add this code lines:if (portion.getPortionFormat().getSymbolFont() != null)
System.out.println("FontNameSymbol: "
+ portion.getPortionFormat()
.getLatinFont()
.getFontName());
if (portion.getPortionFormat()
.getEastAsianFont() != null)
System.out.println("FontNameEA: "
+ portion.getPortionFormat()
.getLatinFont()
.getFontName());

My app works in that way that for every part of text I need toknow font name, font height, is it bold, italic, underlined, text direction…

Can You help me with this?

Thanks
Best regards


Hi, one more thing its not about pptx but I don’t know where to write for that, I don’t get email notification for last few months from your forum, I have checked options to get them but I don’t:

Receive Emails:
Yes No
Receive rich (HTML) emails
Yes No
Enable Email Notifications of forum/thread subscriptions and replies to my posts.
Yes No


Can You please check what’s going on with this?

Thanks a lot

Hi Djordje,

I have observed your comments and like to share that you will receive notification if there is any response from our side or your issue get resolved. Can you please share the thread link for which you expected the notification and did not receive that. Also, your settings are correct and if you are getting the notifications now then it means things are back on track.

Please share, if I may help you further in this regard.

Many Thanks,

Hi,


for last answer on this tread I got notification, but for previous I didn’t. Also this is one of threads for which I didn’t get notification: <a href="https://forum.aspose.com/t/6447. I hope this helps you.

Thanks a lot

Hi Djordje,


I have observed your comments and like to share with you that I have been able to observe the issue. After investigating it on my end I have logged a ticket with ID SLIDESJAVA-34930 into our issue management system for further investigation and resolution of the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.