Different file and export save formats Aspose Slides .NET 14.2.0


#1

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);


#2

Hi Omnath,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for the details.

First of all, to save the file in PPTX file format, you should always use SaveFormat.Pptx and to save the file to PPT format, you should always use SaveFormat.Ppt. Now, as per your query, I am not clear why you are trying to save a PPTX file with SaveFormat.Ppt and vice versa. Both PPT and PPTX formats are different and outcome can be different if you mix them when saving the file.

Now, please let us know your requirement and why are you trying to save PPTX file in PPT format? We need to understand your scenario to help you in a better way.

Thanks & Regards,


#3

I understand the issue in saving PPTX with SaveFormat PPT.

I would like to know more on the other case of saving PPT with SaveFormat PPTX. The example in the tech articles @ http://www.aspose.com/docs/display/slidesnet/Managing+Paragraph+Indent saves as PPT with SaveFormat PPTX.

Please advise on differences. As I said earlier, in the example quoted I see differences in alignment on text inside textbox the output.

"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".

With Unified API, Can we write one single piece of code (Differing only in output format code pres.Save()) which can be used to save to PPT / PPTX with same output content (Including layout, formatting) in PPT & PPTX? Please provide your suggestions.


#4

Hi Omnath,

omnath:

I understand the issue in saving PPTX with SaveFormat PPT.

I would like to know more on the other case of saving PPT with SaveFormat PPTX. The example in the tech articles @ http://www.aspose.com/docs/display/slidesnet/Managing+Paragraph+Indent saves as PPT with SaveFormat PPTX.

We have updated the documentation link to save the PPT file with SaveFormat.Ppt which is correct format to save a PPT file.

omnath:

Please advise on differences. As I said earlier, in the example quoted I see differences in alignment on text inside textbox the output.

"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".

Please use SaveFormat.Ppt with PPT format files and SaveFormat.Pptx with PPTX format files. In case you face any issue, please share the files with us.

omnath:

With Unified API, Can we write one single piece of code (Differing only in output format code pres.Save()) which can be used to save to PPT / PPTX with same output content (Including layout, formatting) in PPT & PPTX? Please provide your suggestions.

Yes, you can write a single piece of code and save it to your desired format.

In case you need any further assistance, please feel free to contact support.

Thanks & Regards,

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

<![endif]–>


#5

Hi Owais,


Thanks for updating the documentation. Now I see the documentation link C# section modified as pres.Save(“InOutDent.ppt”, SaveFormat.Ppt);
VB section has pres.Save(“InOutDent.pptx”, SaveFormat.Ppt). This will result in error while opening downloaded file. Can you please update that section also? I doubt if the snapshot in the help link is correct for save format and file format used. I have attached file InOutDent.ppt which will be generated from the example code. Please update.
With reference to my question on common code written with Unified API (Just differing in only one line for Save either with Save(.ppt, SaveFormat.Ppt) //File-PPT1 Or Save(.pptx, SaveFormat.Pptx) //File-PPTX2 you confirmed that it can be done. As said in my previous post, I am not getting the same output in both. I see differences in formatting. Please find the files attached. I get same output only when the following is used. pres.Save(“C:\AsposeTest\PPT2.ppt”, Aspose.Slides.Export.SaveFormat.Pptx); and pres.Save(“C:\AsposeTest\PPTX2.pptx”, Aspose.Slides.Export.SaveFormat.Pptx); Please confirm.
Thanks,
Omnath

#6

Hi Omnath,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for the details and generated files.

I am able to notice the following two issues when saving the file as PPT and registered these issues to our issue tracking system.

SLIDESNET-35335: Indentation is not applied when saving the file as PPT

SLIDESNET-35336: Color of the content is different when saving as PPT and saving as PPTX.

This thread is linked with the above issues and your will get an automatic notification once the issues get resolved.

Thanks & Regards,


#7

Hi Owais,

Thanks for the update. Could you please tell the ETA for this issue fix? Fix can help in reducing my development efforts by having a common code.

Thanks,

Omnath


#8

Hi Omnath,

Well, your issue has just be registered in our issue tracking system for
further investigation by our development team. Your issue will be scheduled for
investigation team on first come first serve basis. Once the issue gets scheduled
and investigated further, we will be able to share an ETA with you.<?xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /><o:p></o:p>

Thanks & Regards,


#9

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