Aspose Slides converting ppt to images cuts off right hand of slide

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);
                }

@jason.thiel,

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.

7b7f6c9e-9c92-4044-b0b0-49d6d9d9fce1_1.jpg (9.4 KB)
sample.zip (27.1 KB)

As you can see, the slide is shifted to the right and is cut off in the image.
It almost appears to me that there is a margin being added on the left.

@jason.thiel,

As requested earlier, can you please also share the working sample project to reproduce the issue on our end.

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?

@jason.thiel

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.

@jason.thiel,

Its good to know things have worked on your end. Please share if I may help you further in using API.