Hi,
I was trying to print to pdf using POST method and Geoserver print plugin but geoserver logged the following error:
.....
Caused by: org.json.JSONException: A JSONObject text must begin with '{' at character 0
at org.json.JSONTokener.syntaxError(JSONTokener.java:410)
at org.json.JSONObject.(JSONObject.java:179)
at org.json.JSONObject.(JSONObject.java:402)
at org.mapfish.print.MapPrinter.parseSpec(MapPrinter.java:154)
......
I modified the source code in leaflet.print-src.js. Added the following after line 138 (i.e. print function):
contentType: 'application/json; charset=UTF-8',
processData: false,
Now the plugin works as its supposed to work!!!
Yiannis
Hi, I was trying to print to pdf using POST method and Geoserver print plugin but geoserver logged the following error: ..... Caused by: org.json.JSONException: A JSONObject text must begin with '{' at character 0 at org.json.JSONTokener.syntaxError(JSONTokener.java:410) at org.json.JSONObject.(JSONObject.java:179)
at org.json.JSONObject.(JSONObject.java:402)
at org.mapfish.print.MapPrinter.parseSpec(MapPrinter.java:154)
......
I modified the source code in leaflet.print-src.js. Added the following after line 138 (i.e. print function): contentType: 'application/json; charset=UTF-8', processData: false, Now the plugin works as its supposed to work!!! Yiannis