Free Support Forum -

Default printing of TIFF image goes to A4 instead of Letter



I am generating TIFF images using version of Aspose.Imaging for .NET. The images generated have a ratio exactly that of Letter size (8.5 x 11 inches). However when they go to print they are trying to default print at A4 size. Is there a way to set the default printing size of the TIFF image?




Can you please share source file along with generated result and sample code so that we may further investigate to help you out. Also please try to use Aspose.Imaging latest version on your end before sharing requested information.


Hello Muhammad,

Thanks for replying quickly.

I’ve updated the license and this code is programmed against version of Aspose.Imaging.

My code is significantly refactored so I cannot give a file. However I can supply the relevant code fragment here:

var options = new JpegOptions()
CompressionType = JpegCompressionMode.Progressive,
ColorType = JpegCompressionColorMode.Grayscale,
Quality = 50
using (var newImage = new JpegImage(options, 1700, 2200))
var graphics = new Aspose.Imaging.Graphics(newImage);
Aspose.Imaging.Font font = new Aspose.Imaging.Font(“Verdana”, 12, FontStyle.Regular);
Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush(Aspose.Imaging.Color.Black);
graphics.DrawString(“Just a test”, font, brush, 190.0f, 2000.0f);
var TIFFoptions = new TiffOptions(TiffExpectedFormat.TiffLzwRgba)
Compression = TiffCompressions.Lzw,
Xresolution = new TiffRational(200),
Yresolution = new TiffRational(200),
ResolutionUnit = TiffResolutionUnits.Inch,

            BitsPerSample = new ushort[] { 8 },
            Photometric = TiffPhotometrics.Palette,
            Palette = ColorPaletteHelper.Create8BitGrayscale(true)

using (var JPEGms = new MemoryStream())
newImage.Save(JPEGms, options);
JPEGms.Position = 0;
var img1 = Aspose.Imaging.Image.Load(JPEGms, new Aspose.Imaging.LoadOptions() { DataBackgroundColor = Aspose.Imaging.Color.White });
img1.Save(@“C:\Temp\TestFile.tiff”, TIFFoptions);

So this generates a TIFF image with a 200 DPI and a resolution of 1700 pixels wide by 2200 pixels tall, the same proportion of that of an 8.5x11 page.

This defaults printing on an A4 page. It needs to default print to a Letter page.



I have observed the requirement shared by you and an issue with ID IMAGINGNET-3379 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.