Hi,
I am using Aspose 14.2.0 with evaluation license.
Referred the link http://www.aspose.com/docs/display/slidesnet/Managing+Paragraph+Indent and tried the code given in the bottom of this post.
I tried generating the presentation with different file extensions and ExportSaveFormat. I observed the following.
1. pres.Save("C:\\AsposeTest\\PPT1.ppt", Aspose.Slides.Export.SaveFormat.Ppt);
2. pres.Save("C:\\AsposeTest\\PPT2.ppt", Aspose.Slides.Export.SaveFormat.Pptx);
3. pres.Save("C:\\AsposeTest\\PPTX1.pptx", Aspose.Slides.Export.SaveFormat.Ppt); (//File saved. But gives error when opening file. Error may be because PPTX file is saved with SaveFormat PPT)
4. pres.Save("C:\\AsposeTest\\PPTX2.pptx", Aspose.Slides.Export.SaveFormat.Pptx);
More details:
pres.Save("C:\\AsposeTest\\PPT2.ppt", Aspose.Slides.Export.SaveFormat.Pptx); and pres.Save("C:\\AsposeTest\\PPTX2.pptx", Aspose.Slides.Export.SaveFormat.Pptx);
gives same formatting in the output. Only difference I see is the format of file. One is PPT and another is PPTX
pres.Save("C:\\AsposeTest\\PPT1.ppt", Aspose.Slides.Export.SaveFormat.Ppt); and pres.Save("C:\\AsposeTest\\PPT2.ppt", Aspose.Slides.Export.SaveFormat.Pptx);
Differs in the formatting of lines inside the text box
Also when Export.SaveFormat is PptxAspose evaluation watermark is shown. When Export.SaveFormat is Ppt no watermark is shown.
Can you please tell me the difference among above listed different ways of saving presentations?
Code:
Presentation pres = new Presentation();
//Get first slide
ISlide sld = pres.Slides[0];
//Add a Rectangle Shape
IAutoShape rect = sld.Shapes.AddAutoShape(ShapeType.Rectangle, 100, 100, 500, 150);
//Add TextFrame to the Rectangle
ITextFrame tf = rect.AddTextFrame("This is first line \rThis is second line \rThis is third line");
//Set the text to fit the shape
tf.TextFrameFormat.AutofitType = TextAutofitType.Shape;
//Hide the lines of the Rectangle
rect.LineFormat.FillFormat.FillType = FillType.Solid;
//Get first Paragraph in the TextFrame and set its Indent
IParagraph para1 = tf.Paragraphs[0];
//Setting paragraph bullet style and symbol
para1.ParagraphFormat.Bullet.Type = BulletType.Symbol;
para1.ParagraphFormat.Bullet.Char = Convert.ToChar(8226);
para1.ParagraphFormat.Alignment = TextAlignment.Left;
para1.ParagraphFormat.Depth = 2;
para1.ParagraphFormat.Indent = 30;
//Get second Paragraph in the TextFrame and set its Indent
IParagraph para2 = tf.Paragraphs[1];
para2.ParagraphFormat.Bullet.Type = BulletType.Symbol;
para2.ParagraphFormat.Bullet.Char = Convert.ToChar(8226);
para2.ParagraphFormat.Alignment = TextAlignment.Left;
para2.ParagraphFormat.Depth = 2;
para2.ParagraphFormat.Indent = 40;
//Get third Paragraph in the TextFrame and set its Indent
IParagraph para3 = tf.Paragraphs[2];
para3.ParagraphFormat.Bullet.Type = BulletType.Symbol;
para3.ParagraphFormat.Bullet.Char = Convert.ToChar(8226);
para3.ParagraphFormat.Alignment = TextAlignment.Left;
para3.ParagraphFormat.Depth = 2;
para3.ParagraphFormat.Indent = 50;
//Write the Presentation to disk
pres.Save("C:\\AsposeTest\\PPTX2.pptx", Aspose.Slides.Export.SaveFormat.Pptx);