Printing graphics in c# and wpf.

Nigel Wright 291 Reputation points
2021-01-29T04:48:28.967+00:00

I am printing some graphics in c# and wpf.

I can set up the printer ok and print out the graphics.

I can print in 300 dpi and 600 dpi by setting printer resolution fine.
If I set printer resolution to 9600 the print routine reverts to 600 dpi x and 600 dpi y.

According to printer datasheet it should go up to 9600 x and y.

The resolution is being set ok and comes back as -4 which is correct for 9600.
-1 gives 300 dpi and -2 gives 600 dpi.

Developer technologies Visual Studio Other
{count} votes

Accepted answer
  1. Nigel Wright 291 Reputation points
    2021-01-29T18:29:43.26+00:00

    I managed to fix it.
    I wasnt scaling pixels for printer accurately enough.

    This fixed it. A factor of 10 better.
    e.Graphics.ScaleTransform(100f / 1000, 100f / 1000);

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.