Home > Software engineering >  How to use the API to control printing line
How to use the API to control printing line

Time:04-21

Everybody is good:
In order to test the resolution of the printer, I generated a printer to print, image size is 3780 x 5346 (A4 paper 18 times 210 x 297), I let the pixel at the first line of black images, the second line of pixels is white and so on, the print effect is equivalent to about 5 mm drew 50 lines, the width of the generated images below (blank at the bottom of the intercepted by me, convenient to upload) :

Normally printed effect should be below the left (distribution), the result type printer is on the right side of the situation (uneven distribution)


It is said that this kind of printer can meet this resolution, so I think, there is the printing effect is not uniform, is it because let it prints directly, control of the printer is not very fine, can't play the ability of the printer, so I want to directly use Windows API to control the printer (a printer driver itself does not provide API), and see if I can achieve the effect of the uniform, micro printer

I know call TextOut function can control the printer to print words, consult everybody what's API can achieve similar image pixel level of a line of black, a line of white line effect, thank you

CodePudding user response:

It is better to use the program (for example, opencv) in standard A4 paper size line painted on the canvas, generated JPG or PNG file, then print out
Print control API I think is not the key

CodePudding user response:

reference 1st floor bluesen response:
it is better to use the program (for example, opencv) in standard A4 paper size line painted on the canvas, generated JPG or PNG file, then print out
Print control API key
I don't think

I is to use the program to generate images
-- -- -- -- -- -- --
In order to test the resolution of the printer, I generated a printer to print

CodePudding user response:

refer to the second floor tiger bobo response:
Quote: refer to 1st floor bluesen response:
it is better to use the program (for example, opencv) in standard A4 paper size line painted on the canvas, generated JPG or PNG file, then print out
Print control API key
I don't think

I is to use the program to generate images
-- -- -- -- -- -- --
In order to test the resolution of the printer, I generated a printer to print

I'm terribly sorry, front did not carefully read your post,

I doubt or the resolution of the printer is not enough, it is better to try a lower resolution, increase slowly, like you in the first 5 mm on the width of the line 10, 20, 30 again... See the effect gradually

CodePudding user response:

reference bluesen reply: 3/f
Quote: refer to the second floor tiger bobo response:
Quote: refer to 1st floor bluesen response:
it is better to use the program (for example, opencv) in standard A4 paper size line painted on the canvas, generated JPG or PNG file, then print out
Print control API key
I don't think

I is to use the program to generate images
-- -- -- -- -- -- --
In order to test the resolution of the printer, I generated a printer to print

I'm terribly sorry, front did not carefully read your post,

I doubt or the resolution of the printer is not enough, it is better to try a lower resolution, increase slowly, like you in the first 5 mm on the width of the line 10, 20, 30 again... See the effect gradually

Thank you provide the train of thought, printer resolution is said to have enough, I tried to lift up the image resolution effect is better, the original is 3780 x 5346 (A4 paper 18 times 210 x 297), is now 72 times, a BMP images of more than 700 M, effect is better than 18 times

CodePudding user response:

Is there a scale image to print? Image DPI and printer DPI match?

CodePudding user response:

reference 5 floor zgl7903 reply:
is there a zoom images to print? Image DPI and printer DPI match?

Should be indented, no matter how the resolution of the images, printed or as big, image DPI and printer DPI is what?
  • Related