GFDRR / geonode

GFDRR Lab GeoNode
https://www.geonode-gfdrrlab.org
GNU General Public License v3.0
2 stars 3 forks source link

[int] map printing ko #42

Open fvanderbiest opened 7 years ago

fvanderbiest commented 7 years ago

POST http://int.geonode-gfdrrlab.org/geoserver/pdf/create.json

{"units":"m","srs":"EPSG:900913","layout":"A4 portrait","dpi":75,"outputFilename":"GeoExplorer-print","comment":"dbdfd","mapTitle":"ddf","layers":[{"baseURL":"http://int.geonode-gfdrrlab.org/geoserver/wms?SERVICE=WMS&","opacity":1,"singleTile":false,"type":"WMS","layers":["hazard:_2014_1hz10pct50yrs"],"format":"image/png","styles":[""],"customParams":{"TRANSPARENT":true,"TILED":true}}],"pages":[{"center":[-9910880.4571768,4300567.2297349],"scale":4000000,"rotation":0}],"legends":[{"name":"","classes":[{"name":"","icons":["http://int.geonode-gfdrrlab.org/geoserver/wms?request=GetLegendGraphic&width=20&height=20&layer=hazard%3A_2014_1hz10pct50yrs&transparent=true&format=image%2Fpng&legend_options=fontAntiAliasing%3Atrue%3BfontSize%3A11%3BfontName%3AArial&SCALE=4000000"]}]}]}
Error while generating PDF:
com.itextpdf.text.DocumentException: org.mapfish.print.InvalidJsonValueException: spec.layers[0].baseURL has an invalid value: http://int.geonode-gfdrrlab.org/geoserver/wms?SERVICE=WMS& (org.mapfish.print.config.BasicAuthSecurity cannot be cast to org.mapfish.print.config.HostMatcher)
    at com.itextpdf.text.pdf.PdfDocument.add(PdfDocument.java:786)
    at com.itextpdf.text.Document.add(Document.java:278)
fvanderbiest commented 7 years ago

Fixed on prod by changing

  - !basicAuth
    matcher: !dnsMatch
      host: www.geonode-gfdrrlab.org
      port: 80
  ...

into

  - !dnsMatch
    host: www.geonode-gfdrrlab.org
    port: 80

in /mnt/geoserver_datadir/printing/config.yaml

fvanderbiest commented 7 years ago

https://int.geonode-gfdrrlab.org/geoserver/pdf/create.json has a different issue now: Error while generating PDF: Unknown method: /create.json

stufraser1 commented 6 years ago

@fvanderbiest @Vampouille Any updates please?