{
  "svg_drawings": [
    {
      "name": "logo",
      "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"96\" height=\"64\"><defs><radialGradient id=\"lit\" fx=\"0.35\" fy=\"0.35\"><stop offset=\"0\" stop-color=\"rgb(120, 210, 150)\"/><stop offset=\"1\" stop-color=\"rgb(26, 140, 77)\"/></radialGradient><clipPath id=\"corners\"><rect x=\"68\" y=\"16\" width=\"28\" height=\"32\" rx=\"6\"/></clipPath></defs><circle cx=\"32\" cy=\"32\" r=\"26\" fill=\"url(#lit) rgb(26, 140, 77)\"/><rect x=\"68\" y=\"16\" width=\"28\" height=\"32\" fill=\"rgb(60, 60, 60)\" clip-path=\"url(#corners)\"/></svg>"
    }
  ],
  "items": [
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 780.0,
        "urx": 539.0,
        "ury": 799.2
      },
      "content": [
        "Named regions, read back from a template"
      ],
      "font": "DejaVuSans",
      "font_size": 16.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 682.0,
        "urx": 539.0,
        "ury": 766.0
      },
      "content": [
        "A designer marked four rectangles on this delivery label and named them. Each one says what it is filled with and how, and the list travels inside the label's own file. The program below never saw the layout: it read the regions back from the file, placed the label four times, and asked where each region landed. Every coloured frame is its answer."
      ],
      "font": "DejaVuSans",
      "font_size": 10.0,
      "leading": 14.0
    },
    {
      "type": "pdf_page",
      "pdf": "label",
      "page": 1,
      "boundary": "crop",
      "rect": {
        "llx": 56.0,
        "lly": 512.0,
        "urx": 281.0,
        "ury": 662.0
      },
      "fill": {
        "recipient": {
          "text": {
            "content": "Anna Keller\nSeestrasse 12\n8002 Zürich"
          }
        },
        "reference": {
          "text": {
            "content": "Order 0917-1"
          }
        },
        "logo": {
          "drawing": {
            "drawing": "logo"
          }
        },
        "insert": {
          "page": {
            "pdf": "slip",
            "page": 1,
            "fill": {
              "code": {
                "text": {
                  "content": "RET-0917-1"
                }
              }
            }
          }
        }
      }
    },
    {
      "type": "rect",
      "rect": {
        "llx": 65.0,
        "lly": 572.0,
        "urx": 192.5,
        "ury": 624.5
      },
      "stroke": {
        "width": 0.75,
        "color": [
          0.1,
          0.3,
          0.8
        ]
      }
    },
    {
      "type": "rect",
      "rect": {
        "llx": 206.0,
        "lly": 594.5,
        "urx": 272.0,
        "ury": 647.0
      },
      "stroke": {
        "width": 0.75,
        "color": [
          0.1,
          0.55,
          0.3
        ]
      }
    },
    {
      "type": "rect",
      "rect": {
        "llx": 65.0,
        "lly": 524.0,
        "urx": 192.5,
        "ury": 545.0
      },
      "stroke": {
        "width": 0.75,
        "color": [
          0.1,
          0.3,
          0.8
        ]
      }
    },
    {
      "type": "rect",
      "rect": {
        "llx": 206.0,
        "lly": 524.0,
        "urx": 272.0,
        "ury": 584.0
      },
      "stroke": {
        "width": 0.75,
        "color": [
          0.85,
          0.45,
          0.1
        ]
      }
    },
    {
      "type": "pdf_page",
      "pdf": "label",
      "page": 1,
      "boundary": "crop",
      "rect": {
        "llx": 314.0,
        "lly": 512.0,
        "urx": 539.0,
        "ury": 662.0
      },
      "fill": {
        "recipient": {
          "text": {
            "content": "Tomás Ortega\nCalle Mayor 7\n28013 Madrid"
          }
        },
        "reference": {
          "text": {
            "content": "Order 0917-2"
          }
        },
        "logo": {
          "drawing": {
            "drawing": "logo"
          }
        },
        "insert": {
          "page": {
            "pdf": "slip",
            "page": 1,
            "fill": {
              "code": {
                "text": {
                  "content": "RET-0917-2"
                }
              }
            }
          }
        }
      }
    },
    {
      "type": "rect",
      "rect": {
        "llx": 323.0,
        "lly": 572.0,
        "urx": 450.5,
        "ury": 624.5
      },
      "stroke": {
        "width": 0.75,
        "color": [
          0.1,
          0.3,
          0.8
        ]
      }
    },
    {
      "type": "rect",
      "rect": {
        "llx": 464.0,
        "lly": 594.5,
        "urx": 530.0,
        "ury": 647.0
      },
      "stroke": {
        "width": 0.75,
        "color": [
          0.1,
          0.55,
          0.3
        ]
      }
    },
    {
      "type": "rect",
      "rect": {
        "llx": 323.0,
        "lly": 524.0,
        "urx": 450.5,
        "ury": 545.0
      },
      "stroke": {
        "width": 0.75,
        "color": [
          0.1,
          0.3,
          0.8
        ]
      }
    },
    {
      "type": "rect",
      "rect": {
        "llx": 464.0,
        "lly": 524.0,
        "urx": 530.0,
        "ury": 584.0
      },
      "stroke": {
        "width": 0.75,
        "color": [
          0.85,
          0.45,
          0.1
        ]
      }
    },
    {
      "type": "pdf_page",
      "pdf": "label",
      "page": 1,
      "boundary": "crop",
      "rect": {
        "llx": 56.0,
        "lly": 346.0,
        "urx": 281.0,
        "ury": 496.0
      },
      "fill": {
        "recipient": {
          "text": {
            "content": "Claire Martin\n4 rue des Lilas\n69003 Lyon"
          }
        },
        "reference": {
          "text": {
            "content": "Order 0917-3",
            "color": [
              0.8,
              0.1,
              0.1
            ]
          }
        },
        "logo": {
          "drawing": {
            "drawing": "logo"
          }
        },
        "insert": {
          "page": {
            "pdf": "slip",
            "page": 1,
            "fill": {
              "code": {
                "text": {
                  "content": "RET-0917-3"
                }
              }
            }
          }
        }
      }
    },
    {
      "type": "rect",
      "rect": {
        "llx": 65.0,
        "lly": 406.0,
        "urx": 192.5,
        "ury": 458.5
      },
      "stroke": {
        "width": 0.75,
        "color": [
          0.1,
          0.3,
          0.8
        ]
      }
    },
    {
      "type": "rect",
      "rect": {
        "llx": 206.0,
        "lly": 428.5,
        "urx": 272.0,
        "ury": 481.0
      },
      "stroke": {
        "width": 0.75,
        "color": [
          0.1,
          0.55,
          0.3
        ]
      }
    },
    {
      "type": "rect",
      "rect": {
        "llx": 65.0,
        "lly": 358.0,
        "urx": 192.5,
        "ury": 379.0
      },
      "stroke": {
        "width": 0.75,
        "color": [
          0.1,
          0.3,
          0.8
        ]
      }
    },
    {
      "type": "rect",
      "rect": {
        "llx": 206.0,
        "lly": 358.0,
        "urx": 272.0,
        "ury": 418.0
      },
      "stroke": {
        "width": 0.75,
        "color": [
          0.85,
          0.45,
          0.1
        ]
      }
    },
    {
      "type": "pdf_page",
      "pdf": "label",
      "page": 1,
      "boundary": "crop",
      "rect": {
        "llx": 314.0,
        "lly": 346.0,
        "urx": 539.0,
        "ury": 496.0
      },
      "fill": {
        "logo": {
          "image": {
            "image": "logo"
          }
        },
        "insert": {
          "page": {
            "pdf": "slip",
            "page": 1,
            "unfilled": "sample"
          }
        }
      },
      "unfilled": "sample"
    },
    {
      "type": "rect",
      "rect": {
        "llx": 323.0,
        "lly": 406.0,
        "urx": 450.5,
        "ury": 458.5
      },
      "stroke": {
        "width": 0.75,
        "color": [
          0.1,
          0.3,
          0.8
        ]
      }
    },
    {
      "type": "rect",
      "rect": {
        "llx": 464.0,
        "lly": 428.5,
        "urx": 530.0,
        "ury": 481.0
      },
      "stroke": {
        "width": 0.75,
        "color": [
          0.1,
          0.55,
          0.3
        ]
      }
    },
    {
      "type": "rect",
      "rect": {
        "llx": 323.0,
        "lly": 358.0,
        "urx": 450.5,
        "ury": 379.0
      },
      "stroke": {
        "width": 0.75,
        "color": [
          0.1,
          0.3,
          0.8
        ]
      }
    },
    {
      "type": "rect",
      "rect": {
        "llx": 464.0,
        "lly": 358.0,
        "urx": 530.0,
        "ury": 418.0
      },
      "stroke": {
        "width": 0.75,
        "color": [
          0.85,
          0.45,
          0.1
        ]
      }
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 318.0,
        "urx": 539.0,
        "ury": 331.2
      },
      "content": [
        "The regions the label's file carries"
      ],
      "font": "DejaVuSans",
      "font_size": 11.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 300.0,
        "urx": 539.0,
        "ury": 310.8
      },
      "content": [
        "recipient"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 101.396,
        "lly": 300.0,
        "urx": 539.0,
        "ury": 310.8
      },
      "content": [
        "·"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 109.982,
        "lly": 300.0,
        "urx": 539.0,
        "ury": 310.8
      },
      "content": [
        "text"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 133.625,
        "lly": 300.0,
        "urx": 539.0,
        "ury": 310.8
      },
      "content": [
        "·"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 142.211,
        "lly": 300.0,
        "urx": 539.0,
        "ury": 310.8
      },
      "content": [
        "22 90 170 × 70"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 286.0,
        "urx": 539.0,
        "ury": 296.8
      },
      "content": [
        "logo"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 80.957,
        "lly": 286.0,
        "urx": 539.0,
        "ury": 296.8
      },
      "content": [
        "·"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 89.543,
        "lly": 286.0,
        "urx": 539.0,
        "ury": 296.8
      },
      "content": [
        "picture"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 126.902,
        "lly": 286.0,
        "urx": 539.0,
        "ury": 296.8
      },
      "content": [
        "·"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 135.488,
        "lly": 286.0,
        "urx": 539.0,
        "ury": 296.8
      },
      "content": [
        "210 120 88 × 70"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 272.0,
        "urx": 539.0,
        "ury": 282.8
      },
      "content": [
        "reference"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 105.086,
        "lly": 272.0,
        "urx": 539.0,
        "ury": 282.8
      },
      "content": [
        "·"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 113.672,
        "lly": 272.0,
        "urx": 539.0,
        "ury": 282.8
      },
      "content": [
        "text"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 137.315,
        "lly": 272.0,
        "urx": 539.0,
        "ury": 282.8
      },
      "content": [
        "·"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 145.901,
        "lly": 272.0,
        "urx": 539.0,
        "ury": 282.8
      },
      "content": [
        "22 26 170 × 28"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 258.0,
        "urx": 539.0,
        "ury": 268.8
      },
      "content": [
        "insert"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 87.383,
        "lly": 258.0,
        "urx": 539.0,
        "ury": 268.8
      },
      "content": [
        "·"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 95.969,
        "lly": 258.0,
        "urx": 539.0,
        "ury": 268.8
      },
      "content": [
        "page"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 124.175,
        "lly": 258.0,
        "urx": 539.0,
        "ury": 268.8
      },
      "content": [
        "·"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 132.761,
        "lly": 258.0,
        "urx": 539.0,
        "ury": 268.8
      },
      "content": [
        "210 26 88 × 80"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 136.8,
        "urx": 539.0,
        "ury": 232.0
      },
      "content": [
        "Each coloured frame falls on the grey frame the designer drew, although the label is drawn at three quarters of its size and its own coordinates start from a crop box ten points in from its sheet. Filling a region is then a matter of its name alone. That is how the program filled each label: an address, an order number, a logo and a return slip taken from another PDF, each set as its region says. The last label is a proof: the program filled none of its regions, so each one shows the sample the designer left in it. The address and the order number are placeholder text, and the logo and the return slip are the files their regions name."
      ],
      "font": "DejaVuSans",
      "font_size": 8.5,
      "leading": 11.899999999999999,
      "color": [
        0.35,
        0.35,
        0.35
      ]
    }
  ]
}
