O
O
Oleg2018-06-21 08:25:58
Android
Oleg, 2018-06-21 08:25:58

Borderless printing. How to set zero?

I'm writing a print service.
You can set minimum margins in the printer description.
The problem is that a pdf is generated with fields that are unknown to me.
The selection method is not comme il faut.
X useful points.
L,r fields. W media width.
Add information to decide.
Since there are only 384 points on the line, each one is valuable.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2018-10-28
@402d

1pt = 1dot
yes this is not true, but only if we write that the density is 72dpi, we can address each point.
with a real resolution of 203dpi, the line will be 127px for the browser,
since when working with canvas, the minimum resolution is 1/72 inch.
Since there is no way to find out the size of the margins, then in the answer about the paper format we indicate that the minimum margins
are 500 mils = 1/2 inch, and the entire width is int(1000 + 1000 * number_points/72)
Alas, even with this rounding we lose a few points
In the driver itself, after rendering, just bite off 36 pixels at the edges.
I couldn't come up with a better solution in 4 months.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question