Bullets in multi column Placeholder

Hi

I have implemented Aspose Slides for net in most recent version in a custom asp.net application where a preview for a ppt is shown to the visitor of a specific intranet page

I have implemented all this from the code that is in this forum and the docs and it works pretty good so far

There is just one issue that I have with the product:
In my presentation-template from which the final presentation is generated and data is inserted I have one text-placeholder which is filled with some text by the application depending on the users rights
This placeholder is formatted as a text-placeholder with 3 columns and with bullets.

The presentation is built correct with the bullets-lines using the three columns as specified

Just when we generate an thumb for this slide as described here:
Aspose.Slides for .NET|Aspose.Slides Documentation

the Image that is created is not correctly showing this area because it shows the bullets continuing vertically over the edge of the placeholder while the text-lines are correctly put in 3 columns (see attached image)

It seems there is something wrong with generating the preview, because the resulting Slide(pptx) looks correct

regards
Don


Hi Don,


Thanks for your interest in Aspose.Slides.

I have observed the issue shared by you in the image. However, in order to further investigate and reproduce the issue on my end I need source presentation along with the sample project code that you have used for your investigation to reproduce the issue. Kindly share the requested information so that I may further proceed with my investigation to help you out further.

Many Thanks,

Hi Mussadir

Thanks for looking at this
I have uploaded the slide Templaet as an attachement
The part of code where the slide is loaded and prefilled looks like that:

Public Function GeneratePptxSlide(ByVal SLIDE As String, ByVal VDID As String, ByVal ReplaceText As String) As PresentationEx
Dim fis As System.IO.FileStream = New System.IO.FileStream(SLIDE, System.IO.FileMode.Open, System.IO.FileAccess.Read)
Dim pres As PresentationEx = New PresentationEx(fis)
fis.Close()
Dim sld As SlideEx = pres.Slides(0)

’ Iterate through shapes to find and replace the placeholders text
For Each shp As ShapeEx In sld.Shapes
If shp.Placeholder IsNot Nothing Then
If shp.Placeholder.Type = PlaceholderTypeEx.Body Then
If shp.AlternativeText = VDID then
CType(shp, AutoShapeEx).TextFrame.Text = ReplaceText
Exit For
End If
End If
End If
Next
Return ResultSlide
End Function


The part of code where the preview thumbs are generated is here:

Public Sub BuildPreviewImages(ByVal SavePath As String, ByVal SourceFile As String, ByVal slideId as integer)
Dim fis As System.IO.FileStream = New System.IO.FileStream(SourceFile, System.IO.FileMode.Open, System.IO.FileAccess.Read)
Dim pres As PresentationEx = New PresentationEx(fis)
fis.Close()

’ generate temporary thumb for the slide
Dim sld As SlideEx = pres.Slides(slideId)
Dim SlideImg As System.Drawing.Bitmap = New System.Drawing.Bitmap(sld.GetThumbnail(1.20000005F, 1.20000005F))
Dim dpt = “C:/” & SavePath & slideId & “.jpg” ’ DirectoryPaTh
Dim upt = “http://xxxxxxxxx” & SavePath & slideId & “.jpg” ’ UrlPaTh
Try
SlideImg.Save(dpt, System.Drawing.Imaging.ImageFormat.Jpeg)
Catch ex As Exception
End Try

SlideImg.Dispose()

End Sub


As I mentioned before, this all works pretty good for any other template we use
Just this special case (3 columns format and Bullets in the text-placeholder)
thanks in advance for your help
Don

Hi Don,


I have worked with the code snippet shared by you and like to share that you are setting the text for the shape on text frame level. When you do so it means that all the formatting of the text frame will be reset. The bullet property is set on Paragraph level and you need to set the text at lease on paragraph level. Can you please share the content of string ReplaceText so that we may further work over the issue. For your kind reference, I have shared the sample project that I have developed in light of information shared by you. You may use the sample code for your convenience to see how to set the text comprising of multiple bullets in text frame. Please also visit this documentation link for your kind reference.

Many Thanks,