At some time I’ll have to implement a type of printout or report in Glom that uses fixed positioning. For instance, to enter text into the correct spaces on pre-printed forms, or just so that printouts always look the same. At the moment, printouts take up as much space as necessary, and flow appropriately (I “print out” to HTML in the browser at the moment).
So, suggestions are welcome for some code that I should reuse, or adapt. I guess it would need the following abilities.
- Specify text areas precisely, such as specifying the position and size.
- Optionally specify the position in terms of alignment, so that text areas slide left or right.
- Flowing text into those areas, and simply truncating the text if it’s too big. (Or maybe making the font size smaller.)
- Text justification inside the text areas.
- Specifying page margins.
- Coping with a changing page size (e.g. A4 versus Letter) by increasing/cutting-off margins.
- Have a nice GTK+-based UI for doing this.
Something using cairo and pango would be nice.