We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Slides table background color lost when output to pdf

Hi,

I have a Powerpoint presentation which contains a table. When I output it to a pptx file, the background colors on the table are present. When I output the same presentation to a pdf file, the background colors do not appear.

I found one other instance of this in the forum (SLIDESNET-33901) that says it has been fixed, but it is not on mine.

I downloaded the latest Total for .Net yesterday and that is the version I am using.

Public Shared Sub savePptxToPdfFile(ByVal oPres As Presentation, ByRef sFileName As String)

Dim dstStream As New MemoryStream()

Try

oPres.Save(dstStream, Aspose.Slides.Export.SaveFormat.Pdf)

FileUtilities.saveStreamToFile(dstStream, "application/pdf", sFileName)

Catch ex As Exception

HttpContext.Current.Trace.Warn("Failed to save " + sFileName + " Error = " + ex.Message)

End Try

End Sub

Any ideas would be appreciated.

Thanks.

Hi Brad,

I have observed the requirements shared by you and request you to please share the sample presentation and generated PDF with us. I will investigate the issue on my end to help you further in this regard. Secondly, SLIDESNET-33901 refers to change in slide background and not table background. Please share, the requested information so that I may help you further in this regard. Please also try using Aspose.Slides for .NET 14.2.0 on your end first as well.

Many Thanks,

Hi Mudassir,

I think I am using Aspose.Slides for .NET 14.2.0. I downloaded it earlier this week. I am using the Net 4.0 dll version dated 3/24/2014.

I have attached the source pptx and the output pdf. The table colors that are missing are on the last slide.

This is the code that I used to read the pptx and output the pdf:

Protected Sub pbProcessHeader_Click(sender As Object, e As System.EventArgs) Handles pbProcessHeader.Click

Dim oPres As Aspose.Slides.Presentation

Dim sPath As String

sPath = "C:\Users\18300\Desktop\ROC-IM-A001SG.pptx"

oPres = New Presentation(sPath)

If Not oPres Is Nothing Then

Dim dstStream As New MemoryStream()

Try

oPres.Save(dstStream, Aspose.Slides.Export.SaveFormat.Pdf)

FileUtilities.saveStreamToFile(dstStream, "application/pdf", "ROC-IM-A001SG.pdf")

Catch ex As Exception

HttpContext.Current.Trace.Warn("Failed to save " + "ROC-IM-A001SG.pdf" + " Error = " + ex.Message)

End Try

End If

End Sub

Thanks for your help.

PS just noticed the subroutine in there:

Public Shared Sub saveStreamToFile(ByRef oStream As MemoryStream, ByVal sContent As String, ByVal sFile As String)

HttpContext.Current.Response.Buffer = True

HttpContext.Current.Response.Clear()

HttpContext.Current.Response.ContentType = sContent

HttpContext.Current.Response.AddHeader("content-disposition", "attachment; filename=" + sFile)

HttpContext.Current.Response.BinaryWrite(oStream.ToArray())

HttpContext.Current.Response.Flush()

HttpContext.Current.Response.End()

End Sub

Hi Brad,

I have worked with the presentation file shared by you and have been able to observed the issue on slide 8 table. An issue with ID SLIDESNET-35299 has been created in our issue tracking system 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 Mudassir,

Just came back to see how this is going.

It has been four months now and we are getting ready to go live. Would be nice to have this problem fixed, else we will have to make the pdfs manually.

Thanks

Brad

Hi Brad,


I have worked with the presentation file shared by you using Aspose.Slides for .NET 14.6.0 on my end and have been able to find the issue resolved. Can you please try using the specified version on your end to verify the same on your end.

Many Thanks,

Hi Mudassir,

I have confirmed that the latest version does have this problem fixed.

Thanks for your response.

Brad

Hi Brad,

That is appreciable that things have resolved on your end. Please share, if I may help you further in this regard.

Many Thanks,