Our code is developed around PPT and we use Presentation throughout. A request came up to provide the output as PPTX - which we can do as such:
var pptx = new PresentationEx(presentationMemStream);
pptx.Write(@“c:\temp\trial.pptx”);
This works fine and produces the PPTX as required. However there are two bugs, one of which I have worked around - the other not and for which I am seeking assistance.
a) Bullet points appearing
When I add text to the PPT as follows:
text = “test”;
TextFrame textFrame = shape.AddTextFrame(text);
All textboxes will be a list in my result. The work around is as follows:
text = “test”;
TextFrame textFrame = shape.AddTextFrame("");
textFrame.Text = text;
Tested and ‘worked around’ on Aspose.Slides 6.5.0
b) Drop shadows appearing
For some weird reason all text in the document gets the drop shadow property set. I have explicitly set the drop shadow to FALSE on the containing paragraph, but that has no effect whatsoever: all items are still rendered with a drop shadow in the resulting PPTX.
Is this a known bug or am I doing something wrong?
I have observed the two presentation files shared by you and have not been able to completely understand your requirements. Can you please elaborate the requirements in details so that I may help you out further. Can you please explain what you are looking Aspose.Slides for offer you in your situation.
<span style="color:#2b91af;">Presentation</span> ppt = <span style="color:blue;">new</span> <span style="color:#2b91af;">Presentation</span>(<span style="color:#a31515;">@"C:\temp\trial.ppt"</span>);
<span style="color:#2b91af;">MemoryStream</span> stream = <span style="color:blue;">new</span> <span style="color:#2b91af;">MemoryStream</span>();
ppt.Write(stream);
stream.Position = 0;
<span style="color:#2b91af;">PresentationEx</span> pptx = <span style="color:blue;">new</span> <span style="color:#2b91af;">PresentationEx</span>(stream);
pptx.Write(<span style="color:#a31515;">@"C:\temp\trial.pptx"</span>);</pre><pre style="background-color: white; "><font face="Arial" size="2"><span style="white-space: normal; ">This will take the PPT into a memorystream and convert it to PPTX. Now when you look at the result PPTX there is distortion. Shadows are being added - these did not exist before. I want to convert the PPT file to PPTX (in my own application the PPT is a memorystream already) without such artefacts.</span>
Thanks for sharing the details. I have worked with the presentation files shared using the sample code provided by you and have been able to observe the shadow issues in values for charts. For sake of assurance before adding the issue in our issue tracking system, I have shared the identified issues in the attached image files. Can you please verify that is this the issue you are highlighting or there is some thing else as well that I am missing on end.
PS: I have used Aspose.Slides for .NET 6.6.0 on my end.
Yes, these are the issues I am referring too. Are you aware of a workaround for the time being? The only one I can think off is iterating all TextFrames and set the Shadow off in the PresentationEx object and that is not really optimal.
I have created an issue with ID SLIDESNET-33712 in our issue tracking system to further investigate and resolve the issue of shadows getting appeared for the text frames text in converted presentation. For the time being, I have created a sample code that accesses the text frames insides slides and setting the shadow to null. This is the only option that can be used presently.
publicstaticvoid ReolanIssue()
{
// License license = new License();
// license.SetLicense(“Aspose.Slides.lic”);
String path = @“D:\Aspose Data”;
Presentation ppt = new Presentation(path+“trial.ppt”);