开发者

Format text after specific document width

开发者 https://www.devze.com 2023-03-14 21:05 出处:网络
I am printing some text on a printer that have 60mm width papers. I want to print the text so it will be like this :

I am printing some text on a printer that have 60mm width papers.

I want to print the text so it will be like this :

Value1         Value2
Value1         Value2
Value1      开发者_如何学运维   Value2
Value1         Value2
Value1         Value2
Value1         Value2

The value2 should be right aligned.

Dont really know how to measure the 60mm paper so my values will fit.


You need to do some trial/error here because it depends on the DPI. What you can do is that you append spaces between Value1 and Value2 until it's where you want it to be.

If you know the DPI, you can calculate how much will fit into one line, remember though that "m" takes up more space then "i" so if you have "mmm" you might need less spaces than if you have "iii".

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号