line of width 2.3 mm on a printer

Please tell me how to draw a line of 2.3mm width on a printer? If i want to use the glLineWidth then i can specify the width in terms of number of pixels.

But how can i find the exact number of pixels that are equal to 2.3mm??. Because the resolution of the printer is different in X and Y directions and i am not sure which resolution should i take to calculate the number of pixels that are equal to 2.3 mm??

Please help. I thank you in advance.


You will have to read the printer’s settings and calculate the conversion from your size on screen to the printer.

How you would do this is entirely dependant on your Operating System, Printer and programming language.