#===========================================================================
# allowed DPIs
#===========================================================================
dpis: [75, 150, 300]


formats: ['pdf']

#===========================================================================
# the allowed scales
#===========================================================================
scales:
  - 25000
  - 50000
  - 100000
  - 200000
  - 500000
  - 1000000
  - 2000000
  - 4000000

#===========================================================================
# the list of allowed hosts
#===========================================================================
hosts:
  - !localMatch
    dummy: true
  - !ipMatch
    ip: www.camptocamp.org
  - !dnsMatch
    host: labs.metacarta.com
    port: 80
  - !dnsMatch
    host: demo.opengeo.org
    port: 80
  - !dnsMatch
    host: terraservice.net
    port: 80
  - !dnsMatch
    host: sigma.openplans.org
  - !dnsMatch
    host: demo.mapfish.org
  - !dnsMatch
    host: a.tile.openstreetmap.org
  - !dnsMatch
    host: otile1.mqcdn.com
  - !ipMatch
    ip: 195.31.128.31
  - !ipMatch
    ip: 192.168.1.84

layouts:
  Legal:
    mainPage:
      pageSize: LEGAL
      items:
        - !map
          spacingAfter: 30
          width: 440
          height: 483
  #===========================================================================
  A4 portrait:
  #===========================================================================
    #-------------------------------------------------------------------------
    mainPage:
      pageSize: A4
      rotation: true
#      header:
#        height: 50
#        items:
#          - !text
#            font: Helvetica
#            fontSize: 30
#            align: right
#            text: '${layout}'
      items:
        - !text
          text: '${mapTitle}'
          fontSize: 30
          spacingAfter: 30
        - !map
          spacingAfter: 30
          width: 440
          height: 483
        - !columns
          # columns can have an absolute position. In that case, they need the 3 following fields:
          absoluteX: 410
          absoluteY: 310
          width: 100
          items:
            - !scalebar
              type: bar
              maxSize: 100
              barBgColor: white
              fontSize: 8
              align: right
        - !text
          text: 'Qua ci vuole il commento'
          spacingAfter: 30
        - !attributes
          source: data
          spacingAfter: 30
          columnDefs:
            id:
              columnWeight: 2
              header: !text
                text: ID
                backgroundColor: #A0A0A0
              cell: !text
                text: '${id}'
            name:
              columnWeight: 5
              header: !text
                text: Name
                backgroundColor: #A0A0A0
              cell: !columns
                config:
                  cells:
                    - backgroundColor: '${nameBackgroundColor}'
                      borderWidth: 1
                      borderColor: '${nameBorderColor}'
                items:
                  - !text
                    text: '${name}'
            icon:
              columnWeight: 2
              header: !text
                text: Symbol
                backgroundColor: #A0A0A0
              cell: !image
                align: center
                maxWidth: 15
                maxHeight: 15
                url: 'http://www.mapfish.org/svn/mapfish/trunk/MapFish/client/mfbase/mapfish/img/${icon}.png'
        - !text
          font: Helvetica
          fontSize: 9
          align: right
          text: '1:${scale} ${now MM.dd.yyyy}'
      footer: *commonFooter

  #===========================================================================
  A4 landscape:
  #===========================================================================

    mainPage:
      pageSize: A4
      landscape: true
      rotation: true
#      header:
#        height: 20
#        items:
#          - !text
#            font: Helvetica
#            fontSize: 20
#            align: right
#            text: '${layout}'
      items:
        - !text
          text: '${mapTitle}'
          fontSize: 30
          spacingAfter: 20
        - !map
          absoluteX: 52
          absoluteY: 565
          width: 650
          height: 450
        - !columns
          config:
            borderWidth: 1
            cells:
              - borderColor: black
                #padding is required otherwise the box will be empty
                padding: 272
          absoluteX: 31
          absoluteY: 566
          width: 652
          #Blank item required or MapFish Print will fail badly.
          items:
            - !text
              text: ''
        - !columns
          # columns can have an absolute position. In that case, they need the 3 following fields:
          absoluteX: 610
          absoluteY: 110
          width: 100
          items:
            - !scalebar
              type: bar
              maxSize: 100
              barBgColor: white
              fontSize: 8
              align: right
        - !text
          text: '${mapComment}'
          spacingAfter: 30
