I am trying to render to TIFF a simple HTML string so that the resulting TIFF is 8.5 x 11 inches and 225 DPI. However, when I tried the code below, it gives a TIFF with 96 DPI that is 25.78 x 19.92 inches:
Document doc = new Document();
DocumentBuilder db = new DocumentBuilder(doc);
db.InsertHtml("Hello");
Aspose.Words.Rendering.ImageOptions imgOptions = new Aspose.Words.Rendering.ImageOptions();
imgOptions.Resolution = 225;
imgOptions.TiffCompression = Aspose.Words.Rendering.TiffCompression.Ccitt4;
doc.SaveToImage(0, 1, "test.tif", imgOptions);
I tried both of the following methods of setting the page size:
doc.Sections[0].PageSetup.PaperSize = PaperSize.Letter;
db.PageSetup.PaperSize = PaperSize.Letter;
Thanks,
Shamir