When I load a presentation and view a thumbnail of a slide, then change the text on that slide, the new thumbnail crops the new text to the size of the original text. This doesn’t effect the actual slide however.
In the attached zip are the original presentation (blank.ppt), thumbnails before (img1.png) and after (img2.png) the text was modified, and the final presentation (pres.ppt.)
The source to generate these files (except the blank.ppt) is:
Presentation pres = new Presentation(@“C:\blank.ppt”); Slide titleSlide = pres.GetSlideByPosition(1); TextHolder holder1 = (TextHolder)titleSlide.Placeholders[0]; TextHolder holder2 = (TextHolder)titleSlide.Placeholders[1]; Image img1 = titleSlide.GetThumbnail(1.0, 1.0); holder1.Paragraphs[0].Portions[0].Text = “This is all of my new text”; holder2.Paragraphs[0].Portions[0].Text = “This is all of my new text”; Image img2 = titleSlide.GetThumbnail(1.0, 1.0); img1.Save(@“C:\img1.png”, ImageFormat.Png); img2.Save(@“C:\img2.png”, ImageFormat.Png);pres.Write(@“C:\pres.ppt”); |
Andrew Hammer
Senior Developer
ahammer@geodecisions.com