Shrunk headings and a turned label

Headings of different lengths shrunk to share one column, and a label turned a quarter turn up the page's spine.

JSON write_shrink_and_turn.json 103 lines

This one is not a program. It is the request the document server is sent: the same page, asked for over the network by an application that writes no PDF code at all.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
{
  "page": {
    "width": 595.276,
    "height": 841.89
  },
  "items": [
    {
      "type": "line",
      "from": {
        "x": 531.276,
        "y": 760.0
      },
      "to": {
        "x": 531.276,
        "y": 560.0
      },
      "stroke": {
        "color": [
          0.85,
          0.85,
          0.85
        ],
        "width": 0.5
      }
    },
    {
      "type": "text",
      "rect": {
        "llx": 120.0,
        "lly": 740.0,
        "urx": 531.276,
        "ury": 754.192206
      },
      "content": [
        "Consolidated statement of professional services rendered"
      ],
      "font": "DejaVuSans",
      "font_size": 14.192206,
      "leading": 14.192206,
      "align": "right"
    },
    {
      "type": "text",
      "rect": {
        "llx": 120.0,
        "lly": 684.0,
        "urx": 531.276,
        "ury": 714.0
      },
      "content": [
        "Summary of accounts"
      ],
      "font": "DejaVuSans",
      "font_size": 30.0,
      "leading": 30.0,
      "align": "right"
    },
    {
      "type": "text",
      "rect": {
        "llx": 120.0,
        "lly": 628.0,
        "urx": 531.276,
        "ury": 658.0
      },
      "content": [
        "Total due"
      ],
      "font": "DejaVuSans",
      "font_size": 30.0,
      "leading": 30.0,
      "align": "right"
    },
    {
      "type": "text",
      "rect": {
        "llx": 64.0,
        "lly": 64.0,
        "urx": 780.0,
        "ury": 76.0
      },
      "content": [
        "ACME LTD — ANNUAL STATEMENT"
      ],
      "font": "DejaVuSans",
      "font_size": 12.0,
      "leading": 12.0,
      "color": [
        0.55,
        0.55,
        0.55
      ],
      "transform": [
        0.0,
        1.0,
        -1.0,
        0.0,
        128.0,
        0.0
      ]
    }
  ]
}