I know most people are always trying to get smooth settings but this time, since I am printing a barcode, I need to find out how to tell e.Graphics to print my image with the sharpest possible settings. Keep in mind that my current settings produce the best I was able to test so far but, once i print it to a file and zoom in 500%, you can still see a bit of smoothness.
Here's my code so far:
private void printDocument1_PrintPage_1(object sender, PrintPageEventArgs e)
{
double pdf417_widthDPI = Math.Round(((double)picpdf417.Image.Width / (double)288) * 2, 2);
double pdf417_heightDPI = Math.Round(((double)picpdf417.Image.Height / (double)288) * 2, 2);
int newWidth = (int)Math.Round(pdf417_widthDPI * 96);
int newHeight = (int)Math.Round(pdf417_heightDPI * 96);
Rectangle pdf417_location_size = new Rectangle(0, 100, newWidth, newHeight);
e.Graphics.CompositingQuality = CompositingQuality.HighSpeed;
e.Graphics.SmoothingMode = SmoothingMode.None;
e.Graphics.InterpolationMode = InterpolationMode.Low;
e.Graphics.PixelOffsetMode = PixelOffsetMode.None;
e.Graphics.DrawImage(picpdf417.Image, pdf417_location_size);
}