I have code that converts each slide to an image (jpg, tif) using the ISlide.GetGetThumbnail method.
The problem is the resulting file appears to have a “margin” on the left and the image is cut off on the right.
using (Bitmap img = ((ISlide) slide).GetThumbnail(tiffOptions))
{
img.Save(tempFile, ImageFormat.Tiff);
}
I have observed the information shared by you and request you to please share the source presentation, generated output and working sample project with us. Before sharing further information, I also suggest you to please try using latest Aspose.Slides 17.7 on your end first. Please share the requested information with us so that I may proceed further to help you out.
I’ll see if i can extract the code. However, I’m looking more for guidance here rather than an actual solution.
I think that I have found the underlying issue. My presentation is in widescreen 16:9.
When i process it, i force the SlideSizeType to be letter (that is a requirement).
Is there a method for scaling the underlying slide to properly fit in the new size?
I have observed your above requirement and like to share that when you change the slide size, you can set it by providing SlideSizeScaleType value. The EnsureFit value set the content inside the slide w.r.t changed size.
Hey thanks, that did the trick. The SlideSizeScaleType.EnsureFit added to the code resizes my slide to fit on the page properly:
presentation.SlideSize.SetSize(SlideSizeType.LetterPaper, SlideSizeScaleType.EnsureFit);
FYI, we had an earlier 16.x version of Aspose so was missing that function.