Right-to-left feature for ParagraphEx

Hi,
I am using Aspose.Slides for Java 2.9.3, for PPTX. I try to set the property of “right-to-left” for a ParagraphEx - this should align the text as for the Arabic languages (the writing direction should be from right-to-left, not as it is for English language, from left-to-right), but it doesn’t work: in the PPTX output I see the writing direction for text unchanged (it is still ‘left-to-right’).
Below you can see the code I used to set this property:

paragraph.setRightToLeft(NullableBool.TRUE);

Can you please advise on this?

Thanks!

Hi Oana,


I have worked over the requirements shared by you and have been able to observe the issue specified. It seems to be an issue in Aspose.Slides and an issue with ID SLIDESJAVA-33383 has been created to further investigate and resolve 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,

Hi Oana,


I have discussed the issue with our development team and like to share that LeftToRight direction of text works in Aspose.Slides. Please use the following code snippet for your further kind reference.

public static void AddRightToLeft()throws Exception
{
//Instantiate PresentationEx
PresentationEx pres = new PresentationEx();

//Get the first slide
SlideEx sld = pres.getSlides().get(0);

//Add an AutoShape of Rectangle type
int idx = sld.getShapes().addAutoShape(ShapeTypeEx.RECTANGLE, 150, 75,150 , 50);
AutoShapeEx ashp = (AutoShapeEx)sld.getShapes().get(idx);

//Add TextFrame to the Rectangle
ashp.addTextFrame(" ");
TextFrameEx tf=ashp.getTextFrame();
ParagraphEx para=tf.getParagraphs().get(0);
para.setRightToLeft(NullableBool.TRUE);
para.setText(“Aspose \u0647 TextBox”);
// para.setText(“Aspose TextBox”);
NullableBool val=para.isRawRightToLeft();

//Write the presentation to disk
pres.write(“d:\Aspose Data\TextBox.pptx”);
}

I have also share the generated presentation for your kind reference as well. Please note that PowerPoint does not render text consisting of non-RTL symbols (English etc.) in RTL direction. However, you can notice the difference in PowerPoint behavior if you will put cursor on text box’s text and try to move it by pressing “Left Arrow” and “Right Arrow” keys on your computer’s keyboard. The arrows will behave in opposite directions to highlight the Left to Right text direction.

Many Thanks,

Thanks a lot! It was really helpful.