Save Doc as image

Dear support team,

I would like to save each page from a Word document as JPEG. Ok, it’s done. BUT: I would like to add a border (1 px , solid , gray) to each image. How can it be done?
Regards, Carsten

ok. Found it by myself.

For everyone who is interested in:

MemoryStream memPreviewStream = new MemoryStream();
using (Bitmap img = new Bitmap(imgSize.Width, imgSize.Height))
{
img.SetResolution(resolutionPreview, resolutionPreview);
using (Graphics gfx = Graphics.FromImage(img))
{
gfx.Clear(Color.White);
gfx.DrawRectangle(new Pen(Color.DarkGray, 1), new System.Drawing.Rectangle(0, 0, img.Width -1,img.Height -1));
doc.RenderToScale(i, gfx, 0, 0, scale);
img.Save(memPreviewStream, ImageFormat.Jpeg);
}
}
memPreviewStream.Close();

Hi Carsten,

Thanks for your inquiry. It is nice to hear from you that you have found the solution of your issue. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.