TextFrame — Aspose.Slides FOSS for Java API Reference
Properties TextFrame class पैराग्राफ़्स को समाहित करने वाले टेक्स्ट फ्रेम का प्रतिनिधित्व करती है। यह implements ITextFrame.
Properties: org.aspose.slides.foss
import org.aspose.slides.foss.*;public class TextFrame implements ITextFrameProperties
| Properties | Properties | Properties | Properties |
|---|---|---|---|
getText() / setText(String) | String | पढ़ें/लिखें | टेक्स्ट फ्रेम की सादा टेक्स्ट सामग्री।. |
getParagraphs() | IParagraphCollection | Properties | पैराग्राफ़्स का संग्रह।. |
getTextFrameFormat() | ITextFrameFormat | Properties | टेक्स्ट फ्रेम फ़ॉर्मेटिंग गुण।. |
getParentShape() | IShape | Properties | पैरेंट शेप जो इस टेक्स्ट फ्रेम का स्वामित्व रखता है।. |
getParentCell() | ICell | Properties | पैरेंट टेबल सेल (यदि टेबल के भीतर हो)।. |
getSlide() | IBaseSlide | Properties | पैरेंट स्लाइड।. |
getPresentation() | IPresentation | Properties | पैरेंट प्रेज़ेंटेशन।. |
उपयोग उदाहरण
पाठ पढ़ें और लिखें
import org.aspose.slides.foss.*;
Presentation prs = new Presentation("deck.pptx");
ISlide slide = prs.getSlides().get(0);
IAutoShape shape = (IAutoShape) slide.getShapes().get(0);
ITextFrame tf = shape.getTextFrame();
System.out.println("Text: " + tf.getText());
tf.setText("Updated text");
prs.save("updated.pptx", SaveFormat.PPTX);पैराग्राफ़ के साथ काम करें
ITextFrame tf = shape.getTextFrame();
IParagraphCollection paragraphs = tf.getParagraphs();
for (int i = 0; i < paragraphs.size(); i++) {
IParagraph para = paragraphs.get(i);
System.out.println("Paragraph " + i + ": " + para.getText());
}