<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Dear Paolo,<div class=""><br class=""></div><div class="">sorry I´ve might have sent you on a wrong track. But I think printing plugin (mapfish) and printng are different extensions.</div><div class=""><br class=""></div><div class="">The one you might be interested in should be:</div><div class=""><a href="https://github.com/boundlessgeo/geoserver-exts/tree/46dc818caf57d2b5ca1d04e8f40926c67b11493f/printng" class="">https://github.com/boundlessgeo/geoserver-exts/tree/46dc818caf57d2b5ca1d04e8f40926c67b11493f/printng</a></div><div class=""><br class=""></div><div class="">where you find some docs here:</div><div class=""><a href="https://github.com/boundlessgeo/geoserver-exts/blob/46dc818caf57d2b5ca1d04e8f40926c67b11493f/printng/doc/api.rst" class="">https://github.com/boundlessgeo/geoserver-exts/blob/46dc818caf57d2b5ca1d04e8f40926c67b11493f/printng/doc/api.rst</a></div><div class=""><br class=""></div><div class="">In case of the caching behavior maybe it helps to dig a bit in code</div><div class=""><a href="https://github.com/boundlessgeo/geoserver-exts/blob/46dc818caf57d2b5ca1d04e8f40926c67b11493f/printng/src/main/java/org/geoserver/printng/PrintUserAgentCallback.java#L156" class="">https://github.com/boundlessgeo/geoserver-exts/blob/46dc818caf57d2b5ca1d04e8f40926c67b11493f/printng/src/main/java/org/geoserver/printng/PrintUserAgentCallback.java#L156</a></div><div class=""> <br class=""><div>So from what I see caching has nothing to do with GWC but with a base64 string written to cacheDIr:</div><div><a href="https://github.com/boundlessgeo/geoserver-exts/blob/46dc818caf57d2b5ca1d04e8f40926c67b11493f/printng/src/main/java/org/geoserver/printng/PrintUserAgentCallback.java#L147" class="">https://github.com/boundlessgeo/geoserver-exts/blob/46dc818caf57d2b5ca1d04e8f40926c67b11493f/printng/src/main/java/org/geoserver/printng/PrintUserAgentCallback.java#L147</a></div><div><br class=""></div><div>Where cacheDir is the java.io.tmpdir value. Which might be just /tmp or /var/tmp on Linux plattforms.</div><div><a href="https://github.com/boundlessgeo/geoserver-exts/blob/46dc818caf57d2b5ca1d04e8f40926c67b11493f/printng/src/main/java/org/geoserver/printng/PrintSupport.java#L28" class="">https://github.com/boundlessgeo/geoserver-exts/blob/46dc818caf57d2b5ca1d04e8f40926c67b11493f/printng/src/main/java/org/geoserver/printng/PrintSupport.java#L28</a></div><div><br class=""></div><div>My guess is your baselayer is kicked out somewhere here:</div><div><a href="https://github.com/boundlessgeo/geoserver-exts/blob/46dc818caf57d2b5ca1d04e8f40926c67b11493f/printng/src/main/java/org/geoserver/printng/PrintUserAgentCallback.java#L92" class="">https://github.com/boundlessgeo/geoserver-exts/blob/46dc818caf57d2b5ca1d04e8f40926c67b11493f/printng/src/main/java/org/geoserver/printng/PrintUserAgentCallback.java#L92</a></div><div><br class=""></div><div>Can you double check that your sent html fulfills all requirements like img tags, correct style attribute with</div><div>no display: none etc in other words what the if statements expect?</div><div><br class=""></div><div>Another thing what could fail is when loading the resource:</div><div><a href="https://github.com/boundlessgeo/geoserver-exts/blob/46dc818caf57d2b5ca1d04e8f40926c67b11493f/printng/src/main/java/org/geoserver/printng/PrintUserAgentCallback.java#L78" class="">https://github.com/boundlessgeo/geoserver-exts/blob/46dc818caf57d2b5ca1d04e8f40926c67b11493f/printng/src/main/java/org/geoserver/printng/PrintUserAgentCallback.java#L78</a></div><div><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-variant-ligatures: normal; orphans: 2; white-space: pre; widows: 2; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div>Unfortunately I´m not a Java guy at all, so others might definitly know better.</div><div><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-variant-ligatures: normal; orphans: 2; white-space: pre; widows: 2; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div><br class=""></div><div>Best regards,</div><div><br class=""></div><div>Toni</div><div><br class=""></div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">Am 26.02.2019 um 00:20 schrieb Paolo Corti <<a href="mailto:pcorti@gmail.com" class="">pcorti@gmail.com</a>>:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi Toni<br class=""><br class="">thanks for helping with this.<br class=""><br class="">As a first thing, I tried to add the base layers IP in the hosts<br class="">section of config.yaml (with !dnsMatch).<br class="">What is confusing me, looking at the log, is that GeoServer is trying<br class="">to read the tiles from the cache, as it would be a local layer:<br class=""><br class="">....<br class="">2019-02-25 23:16:25,811 DEBUG [geoserver.printng] - using cache for<br class=""><a href="http://t4.tianditu.com/DataServer?T=vec_w&X=14&Y=7&L=4&tk=mykey" class="">http://t4.tianditu.com/DataServer?T=vec_w&X=14&Y=7&L=4&tk=mykey</a><br class="">2019-02-25 23:16:25,812 DEBUG [geoserver.printng] - using cache for<br class="">http://t4.tianditu.com/DataServer?T=vec_w&X=14&Y=5&L=4&tk=mykey<br class="">...<br class=""><br class="">not sure how to solve this. Maybe I'll ask in the GeoServer list<br class="">best<br class="">Paolo<br class=""><br class="">On Sat, Feb 23, 2019 at 3:38 PM Toni Schönbuchner<br class=""><toni.schoenbuchner@csgis.de> wrote:<br class=""><blockquote type="cite" class=""><br class="">Dear Paolo,<br class=""><br class="">some time ago I´ve been in a similar situation trying to debug thumbnails with leaflet.<br class="">Unfortuantely I could not find docs for printing execept:<br class=""><br class="">https://docs.geoserver.org/latest/en/user/extensions/printing/index.html<br class="">https://docs.geoserver.org/stable/en/user/extensions/printing/configuration.html<br class=""><br class="">However what helped me was a to double check that cleaned markup has everything we need:<br class="">https://github.com/GeoNode/geonode/blob/master/geonode/static/geonode/js/utils/thumbnail.js#L17<br class=""><br class="">I did this by just testing the code in browser console and adding the cloned map to the body.<br class="">Then to work a bit faster I´ve used https://www.getpostman.com/ to send the generated markup to the printing endpoint.<br class=""><br class="">If I remember correctly I´ve faced an issue with thumbnail.js deleting to much and some SSL mixed<br class="">content blocking.<br class=""><br class="">Not much, but hopefully a start.<br class=""><br class="">cheers,<br class=""><br class="">Toni<br class=""><br class=""><br class=""><br class="">Message: 1<br class="">Date: Fri, 22 Feb 2019 17:35:04 -0500<br class="">From: Paolo Corti <pcorti@gmail.com><br class="">To: geonode-devel <geonode-devel@lists.osgeo.org><br class="">Subject: [GeoNode-devel] generation of layer's thumbnail with a custom<br class="">base map<br class="">Message-ID:<br class=""><CAHXrU-KOd-v4aivGgvz3O9c0Sv-qmSmW=4gLT1QKTH5Mgidbfg@mail.gmail.com><br class="">Content-Type: text/plain; charset="UTF-8"<br class=""><br class="">Hi GeoNode developers<br class=""><br class="">We have the following problem: in one of our instances we are using<br class="">some custom basemaps. When using the "Set Thumbnail" feature from<br class="">layer page using one of this custom base maps, the thumbnail is<br class="">created but only the layer is rendered, in a white background.<br class="">Debugging the code, it looks like the thumbnail is generated by<br class="">sending a post request to geoserver/rest/printng (in the<br class="">geoserver/helpers.py/_render_thumbnail).<br class="">Where can I find some documentation about this printng GeoServer endpoint?<br class=""><br class="">Thanks<br class="">Paolo<br class=""><br class="">--<br class="">Paolo Corti<br class="">Geospatial software developer<br class="">web: http://www.paolocorti.net<br class="">twitter: @capooti<br class="">skype: capooti<br class=""><br class=""><br class="">------------------------------<br class=""><br class="">Subject: Digest Footer<br class=""><br class="">_______________________________________________<br class="">geonode-devel mailing list<br class="">geonode-devel@lists.osgeo.org<br class="">https://lists.osgeo.org/mailman/listinfo/geonode-devel<br class=""><br class=""><br class="">------------------------------<br class=""><br class="">End of geonode-devel Digest, Vol 49, Issue 22<br class="">*********************************************<br class=""><br class=""><br class=""></blockquote><br class=""><br class="">-- <br class="">Paolo Corti<br class="">Geospatial software developer<br class="">web: http://www.paolocorti.net<br class="">twitter: @capooti<br class="">skype: capooti<br class=""><br class=""></div></div></blockquote></div><br class=""></div></body></html>