Have you looked at something like Latex or Typst? They come with their own layout engine, so potentially less tedious work like specifying exact positions.