Hi Aravind,
ARAVINDDSRC:
But we can only give upto "2"right?
Thanks for your feedback. There is no limitation of scale factor. I have tested with 3 using Aspose.Words for .NET 17.3.0 and unable to notice any issue. However if you are facing any issue then please share your sample code along with document here, we will look into it and will guide you accordingly.
ARAVINDDSRC:
what about height and width?
For setting height and width image, you can use RenderToSize() method of Document class as following.
private static void SaveToImage(Document doc, int pageIndex, string imageName, int width, int height)
{
using (Bitmap bmp = new Bitmap(width, height))
{
// User has some sort of a Graphics object. In this case created from a bitmap.
using (Graphics gr = Graphics.FromImage(bmp))
{
Color backgroundColor = doc.PageColor;
if (backgroundColor == Color.Empty)
backgroundColor = Color.White;
gr.FillRectangle(new System.Drawing.SolidBrush(backgroundColor), 0, 0, width, height);
gr.TextRenderingHint = TextRenderingHint.AntiAliasGridFit;
gr.PageUnit = GraphicsUnit.Pixel;
doc.RenderToSize(pageIndex, gr, 0f, 0f, width, height);
bmp.Save(imageName);
}
}
}
Please feel free to contact us for any further assistance.
Best Regards,