Print text at a specific location on pre-printed paper using C #

I need to print in the same way as when printing paper texts at a specific place in printed paper. The reason is that printing is done on an already printed form with fields such as first name and last name. Therefore, when I get the name of the person, and he must print in this allocated space in paper form.

It's amazing if there are any existing libraries that will allow me to print at a specific position using a coordinate system such as the X and Y coordinates.

+4
source share
2 answers

Here you are, so you can get started ....... http://msdn.microsoft.com/en-us/library/aa287530(v=vs.71).aspx

Using this tutorial, I suggest you print at about four corners of the page, so that you know the print coordinate system.

Using this and a good ruler, you can find out where the fields are in your paper form, and translate them into xy coordinates on the code.

+2
source

Try making the PDF the same size as on the form page, with the appropriate text on it. Then print the PDF to the printer, on which the pre-printed forms loaded in the paper are loaded.

I will leave it to you to find a library that can work with PDF files. In Python, I would use reportlab . Find your local C # equivalent.

+1
source

Source: https://habr.com/ru/post/1412704/


All Articles