Evaluating the product - need help!



This looks very promising but I have a few questions -

1. I want to save individual slides out as JPG files at a specific width and height. SavetoSVG appears to be just for vectors. How do I save as jpeg?

2. I want to grab the title, body, etc. text in each slide - looping through the collection. There are very few examples and after digging through the documentation for a long time have come up empty. Is there a simple sample that goes through all the shapes in a given slide? Thanks.


To save slides as jpeg you should use Slide.GetThumbnail function. Please check Pictures demo.

To read all text on a slide you should iterate all textholders and shapes.
Check TextDemo demo. It delete all text on a slide. You need just read it.


Thank you. But where would I find the demos - certainly not in the demos area of your site, or in the product download for slides. Please help!


You should download Aspose.Slides and install it.
Demos will be in the \Program Files\Aspose\Aspose.Slides\Demos directory.



Almost there - I can output the graphics, but having difficulty with text

I have an extremely simple 3 slide test file that has a title and single bullet + notes for the first two slide, the third slide has no notes.

I can easily obtain notes but cannot obtain text at all -here is my code fragment - the object has already been created and a PPT file opened successfully

For each shape in Pres.Slides(i).Shapes
If not shape.textframe is Nothing then
Dim tf as TextFrame
Dim nt as Notes
Dim para as Paragraph

tf = shape.TextFrame
nt = Pres.Slides(i).Notes

if tf.IsTextHolder then
’ try to get text here
For each para in tf.Paragraphs
SlideText = Slidetext & para.Text
end if
End If



Important part was lost in the VB version of this demo.
You should check also Placeholders collection for each slide.

Dim j As Integer
For j = 0 To slide.Placeholders.Count - 1
Dim holder As Placeholder = slide.Placeholders(j)
If TypeOf holder Is TextHolder Then
For Each Paragraph para in(CType(holder, TextHolder)).Paragraphs
SlideText = SlideText & para.Text
End If


I just tried your code frag and there must be something missing - even though I have already created the slide object and assigned it to a slide in the presentation,

The second line in your sample - slide.Placeholders.Count dies with an Object Reference Not set to an instance of the object error. I checked and I dont think it is a scope issue as the slide object is set within the same loop, higher up sequentially in the code. Any ideas on how to fix this?


Placeholders property can’t be null in any case. Probably that is because slide is null in your case.


Many thanks for your help. This product is PERFECT and solves many problems. Tired of living dangerously and single threaded. I will purchase shortly.


One final question, the PPT2PDF demo requires not only the Slides product, but the PDF one as well?

The reason I ask is that I cannot crease the object Aspose.pdf.pdf

Please let me know.


There are 2 ways to create PDF files. One is create images and insert it to PDF file (PPT2PDF demo).
Another way is use Presentation.SaveToPdf method. You don’t need Aspose.Pdf in this case.

Please check Wiki page:


This does not work and I have posted several times on this board and have been ignored.

Our code is identical to what you have listed above. What is happening is that we are looping through a 58 slide presentation and when we get to the line

if TypeOfholder is TextHolder then

never evaluates to true even through there are plenty of bullet points and type in the presentation. PLEASE HELP!


I tested code before posting in the forum. It works for me and probably for hundreds of customers because you are the first who tell about such problems.
If you need help please provide your real code and example of presentation where this code doesn’t work.

Also you can try to use iterator:

Dim iterator As IDictionaryEnumerator = slide.Placeholders.GetEnumerator()
While iterator.MoveNext()
If TypeOf iterator.Value Is TextHolder Then
Dim th As TextHolder = CType(iterator.Value, TextHolder)
Dim para As Paragraph
For Each para In th.Paragraphs
End If
End While