Printer resolutions are generally 5-6 times greater than a screen's resolution. A printer's resolution can be around 6600 x 5100 as opposed to a full HD screen's resolution: 1920 x 1080.
An 1920 x 1080 image looks great on a screen but to avoid pixelation, one should ideally render a much higher resolution image to the printer, for example, a 6600 x 5100 image.
I am trying to print a high definition image (6600 x 5100) to my high definition printer (600 dpi), but I find that the available print area is only 850 x 1100 as specified by e.PageBounds; see the code below:
Bitmap bitmapToPrint;
public void printImage()
{
bitmapToPrint = new Bitmap(1700,2200);
Font font = new Font(FontFamily.GenericSansSerif, 60, FontStyle.Regular);
string alphabet = "abcdefghijklmnopqrstuvwxyz";
Graphics graphics = Graphics.FromImage(bitmapToPrint);
graphics.DrawString(alphabet, font, System.Drawing.Brushes.Black, 0, 0);
graphics.DrawString(alphabet, font, System.Drawing.Brushes.Black, 0, 1000);
PrintDocument pd = new PrintDocument();
pd.PrinterSettings.PrinterName = "Microsoft XPS Document Writer";
pd.PrinterSettings.PrintToFile = true;
pd.PrintPage += new PrintPageEventHandler(pd_PrintPage);
pd.Print();
}
void pd_PrintPage(object sender, PrintPageEventArgs e)
{
e.Graphics.DrawImage(bitmapToPrint, new PointF(0, 0));
//Have a look at e.PageBounds, the dimensions are only 850x1100
}