Hi,
this is usually a symptom of the request for getting the map image failing (it returns an XML instead of an image). You should have a look at GeoServer log files to understand if you can get the real exception. If you send me the log file of GeoServer immediately after a failing print I can try to help you.
Mauro
2017-12-06 16:12 GMT+01:00 jcb81 <jcbastin@…4838…>:
Hello everyone,
I searched for many hours for my issue, I hope I’ll get some answers here.
The context : I installed Geoserver (2.11.1) and configured some layers
coming from stores “Oracle NG” and “WMS”. I also installed the print module
“Mapfish” to be able to send print request from a web application to
generate map reports.
After many searches, I can now configure well the “config.yaml” file to
configure the print layouts, and I understand how works the GET and POST
http print requests and parameters.
Here is my issue : the print request work well with layers coming from
“Oracle NG” store, but not the ones from the “WMS” store. When I download
the generated PDF, I get my report with a blank map and an exception message
in a little yellow box near the map area : “java.io.IOException: The byte
array is not a recognized imageformat.”
<http://osgeo-org.1560.x6.nabble.com/file/t370398/mapfish_print_error_1.png>
<http://osgeo-org.1560.x6.nabble.com/file/t370398/mapfish_print_error_2.png>
Here is a working request :
http://localhost:9100/geoserver/pdf/print.pdf?spec={outputFilename:'print-${yyyyMMddHHmmss}',layout:‘MY_MAP_LAYOUT’,pages:[{center:[88861.938477485,100786.976035025],scale:10000,rotation:0}],dpi:75,units:‘m’,srs:‘EPSG:2169’,layers:[{baseURL:‘http://localhost:9100/geoserver/wms’,type:‘WMS’,layers:[‘WS:ORACLE_LAYER’],format:‘image/png’}]}
Here is a NOT working request :
http://localhost:9100/geoserver/pdf/print.pdf?spec={outputFilename:'print-${yyyyMMddHHmmss}',layout:‘MY_MAP_LAYOUT’,pages:[{center:[88861.938477485,100786.976035025],scale:10000,rotation:0}],dpi:75,units:‘m’,srs:‘EPSG:2169’,layers:[{baseURL:‘http://localhost:9100/geoserver/wms’,type:‘WMS’,layers:[‘WS:WMS_LAYER’],format:‘image/png’}]}
Only the layer asked changes in the parameters.
The only thing I found for now is about authentification issue on WMS
layers, but my WMS layers don’t have any authentification, they can be
reached as it.
Is anyone here already had this issue ? Or have an explanation on what I’m
doing wrong ?
Any help will be really appreciated !
–
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-Dev-f3819232.html
Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Geoserver-devel mailing list
Geoserver-devel@…366…sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
–
Regards,
Mauro Bartolomeoli
== GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Dott. Mauro Bartolomeoli @mauro_bart Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 1660272 http://www.geo-solutions.it http://twitter.com/geosolutions_it -------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.