I am trying to replicate some old label-making software which allows for choosing label size among other things. The sizes of the labels are known by their standard measurements (2.5 inches by 1 inch, for example). I see how to detect OS and send basic print jobs. The print jobs seem to be just strings sent to the printer. If I am trying to, for example, move two inches right before printing the next portion of the job, would I just increase the whitespace in the string (does some amount of whitespace always correspond to a physical measurement when printed)? Is there some way to define portions of a page or some other way to jump around between XY coordinates on a known page size?
Asked
Active
Viewed 83 times
1 Answers
1
I have written software in Python that print HTML pages. The advantage of HTML is a good language to print anything you like, formatting is easy, debugging can be done using any webbrowser.
Next you can use software like PrinceXML that allows you to convert the HTML pages a printable page. via the stylesheet you a can define the size of your page.
Feel free to concept mee if you need more help.

H Doucet
- 77
- 7
-
So I could send the data to an html/css file and there I can specify things like a physical size? – crazyfox Nov 13 '16 at 00:18
-
Yes you can .. PrinceXML understand the @page rule [link] (https://www.tutorialspoint.com/css/css_paged_media.htm) . – H Doucet Nov 13 '16 at 00:23
-
So I would look into the @page rule for doing this without proprietary software? Thanks – crazyfox Nov 13 '16 at 01:10
-
This is indeed a way, I have no experience the @page without PrinceXML. After all you will need some engine that understand the size of a page. And this is something most ebbrowser do not understand. See [link] http://stackoverflow.com/questions/20946723/chrome-does-not-support-the-css-page – H Doucet Nov 13 '16 at 01:13