<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><span>ok thanks.</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><span>If the solution is to server the layers as tms then iīm out of luck because TMS is not working in my installed version of geoserver &nbsp;I donīt understand what "</span><span class="Apple-style-span" style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; ">redirecting the willed GWC</span></div><span class="Apple-style-span" style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; ">layers to the related GeoServer layers before they are printed" means.!!?!</span><div style="font-family: arial, helvetica,
 sans-serif; font-size: 10pt; "><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><span>I have tried to make a simple html print window in javscript, but now the problem is that the raster backgrounds only work in IE9 on Windows7 and on SP only the vector data can be printed!</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; ">I neve knew that printing could be such a head ache!</div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><span>yours,</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><span>Rob</span></div><div
 style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div>  <div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">Von:</span></b> Tobias Reinicke &lt;ramotswa@gmail.com&gt;<br> <b><span style="font-weight: bold;">An:</span></b> Robert Buckley &lt;robertdbuckley@yahoo.com&gt; <br> <b><span style="font-weight: bold;">Gesendet:</span></b> 14:02 Donnerstag, 24.November 2011<br> <b><span style="font-weight: bold;">Betreff:</span></b> Re: [OpenLayers-Users] pdf export: why the request for tile dimensions of 625x458<br> </font> <br>Hi Robert,<br>So from that link the sentence that is most important is:<br><br>The solution is to use OpenLayers.Layer.TMS for the geowebcache layers<br>rather than OpenLayer.Layer.WMS<br><br>So you're WMS layers needs to
 change to be a TMS layer, if that is<br>acceptable to you. The other solution is in the next post:<br>I also went into this problem few days ago. I tried using TMS layers but<br>without success. The solution I pitched on was redirecting the willed GWC<br>layers to the related GeoServer layers before they are printed. It's not a<br>pretty solution, but it works well!&nbsp; [1]<br><br><br><br>[1] <a href="http://www.mail-archive.com/users@geoext.org/msg01973.html" target="_blank">http://www.mail-archive.com/users@geoext.org/msg01973.html</a><br><br><br><br>Toby<br><br>On 24 November 2011 07:39, Robert Buckley &lt;<a ymailto="mailto:robertdbuckley@yahoo.com" href="mailto:robertdbuckley@yahoo.com">robertdbuckley@yahoo.com</a>&gt; wrote:<br>&gt; Hi,<br>&gt; Thanks for the reply.<br>&gt; according to my research it is possible. gbrun manaed to get this working<br>&gt; with TMS services with the help of Matt Prior documented in the link below.<br>&gt; The
 proof is in the online map here<br>&gt; <a href="http://gis.catawbacountync.gov/gwc/print_gwc.html" target="_blank">http://gis.catawbacountync.gov/gwc/print_gwc.html</a><br>&gt; <a href="http://www.mail-archive.com/users@geoext.org/msg01973.html" target="_blank">http://www.mail-archive.com/users@geoext.org/msg01973.html</a><br>&gt;<br>&gt; yours,<br>&gt; Rob<br>&gt;<br>&gt;<br>&gt; ________________________________<br>&gt; Von: Toby R &lt;<a ymailto="mailto:ramotswa@gmail.com" href="mailto:ramotswa@gmail.com">ramotswa@gmail.com</a>&gt;<br>&gt; An: Robert Buckley &lt;<a ymailto="mailto:robertdbuckley@yahoo.com" href="mailto:robertdbuckley@yahoo.com">robertdbuckley@yahoo.com</a>&gt;<br>&gt; Cc: "<a ymailto="mailto:geoserver-users@lists.sourceforge.net" href="mailto:geoserver-users@lists.sourceforge.net">geoserver-users@lists.sourceforge.net</a>"<br>&gt; &lt;<a ymailto="mailto:geoserver-users@lists.sourceforge.net"
 href="mailto:geoserver-users@lists.sourceforge.net">geoserver-users@lists.sourceforge.net</a>&gt;; "<a ymailto="mailto:users@mapfish.org" href="mailto:users@mapfish.org">users@mapfish.org</a>"<br>&gt; &lt;<a ymailto="mailto:users@mapfish.org" href="mailto:users@mapfish.org">users@mapfish.org</a>&gt;; "<a ymailto="mailto:users@geoext.org" href="mailto:users@geoext.org">users@geoext.org</a>" &lt;<a ymailto="mailto:users@geoext.org" href="mailto:users@geoext.org">users@geoext.org</a>&gt;;<br>&gt; "<a ymailto="mailto:users@openlayers.org" href="mailto:users@openlayers.org">users@openlayers.org</a>" &lt;<a ymailto="mailto:users@openlayers.org" href="mailto:users@openlayers.org">users@openlayers.org</a>&gt;<br>&gt; Gesendet: 8:25 Donnerstag, 24.November 2011<br>&gt; Betreff: Re: [OpenLayers-Users] pdf export: why the request for tile<br>&gt; dimensions of 625x458<br>&gt;<br>&gt; Hi Robert,<br>&gt; This may not be entirely helpful however I don't think that
 mapfish supports<br>&gt; printing from a tile cache. The way it works normally is that it sends the<br>&gt; request straight to the wms server which can obviously respond to the size<br>&gt; it requires.<br>&gt; The reason you are getting that tile size is because that's the size of the<br>&gt; window you are trying to print (I presume).<br>&gt; As a test, if you were to point your layer_topo straight to the wms does<br>&gt; printing work?<br>&gt;<br>&gt; Toby<br>&gt;<br>&gt;<br>&gt; On 24 Nov 2011, at 06:53, Robert Buckley &lt;<a ymailto="mailto:robertdbuckley@yahoo.com" href="mailto:robertdbuckley@yahoo.com">robertdbuckley@yahoo.com</a>&gt; wrote:<br>&gt;<br>&gt;<br>&gt; Hi,<br>&gt; Problem: I canīt print any tiles coming from geowebcache!<br>&gt; gridset: 900913<br>&gt; System: Linux Ubuntu 10.04 / tomcat6 / Geoserver 2.1.2<br>&gt; Javscript<br>&gt; // map<br>&gt; var map = new OpenLayers.Map("map", {<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; id:
 'map',<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; projection: new OpenLayers.Projection("EPSG:900913"),<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; displayProjection: new OpenLayers.Projection("EPSG:4326"),<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; units: "m",<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; maxResolution: 156543.0339,<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508,<br>&gt; 20037508.34),<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; numZoomLevels: 17,<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; controls: [new OpenLayers.Control.MouseDefaults(), new<br>&gt; OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.MousePosition(), new<br>&gt; OpenLayers.Control.ScaleLine({<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; geodesic: true<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; })]<br>&gt; &nbsp; &nbsp; });<br>&gt; // layer GWC<br>&gt; var layer_topo = new OpenLayers.Layer.WMS("Topographischekarte",<br>&gt; "<a
 href="http://maps.zgb.de/geoserver/gwc/service/wms/" target="_blank">http://maps.zgb.de/geoserver/gwc/service/wms/</a>", {<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; layers: 'zgb:tk50',<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; projection: "EPSG:900913",<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; format: 'image/png',<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; transparent: true,<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; singleTile: false<br>&gt; &nbsp; &nbsp; }, {<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; 'buffer': 0,<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; 'opacity': 1,<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; 'isBaseLayer': true,<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; visibility: true<br>&gt; &nbsp; &nbsp; });<br>&gt; Geoserver log<br>&gt; 2011-11-24 07:39:54,199 ERROR [geowebcache.GeoWebCacheDispatcher] - The<br>&gt; requested tile dimensions 625x458 do not match those of the grid set<br>&gt; (256x256) <a href="http://maps.zgb.de/geoserver/gwc/service/wms"
 target="_blank">http://maps.zgb.de/geoserver/gwc/service/wms</a><br>&gt; 2011-11-24 07:39:54,200 WARN [print.PDFUtils] - Server returned an error for<br>&gt; <a href="http://maps.zgb.de/geoserver/gwc/service/wms?BBOX=1176787.0%2C6892762.5%2C1181754.1%2C6899536.0&amp;HEIGHT=625&amp;WIDTH=458&amp;map_resolution=75&amp;SERVICE=WMS&amp;REQUEST=GetMap&amp;STYLES=&amp;TILESIZE=%7B%22w%22%3A256%2C%22h%22%3A256%7D&amp;TRANSPARENT=true&amp;VERSION=1.1.1&amp;FORMAT=image%2Fpng&amp;PROJECTION=EPSG%3A900913&amp;format_options=dpi%3A75&amp;LAYERS=zgb%3Atk50&amp;SINGLETILE=false&amp;SRS=EPSG%3A900913"
 target="_blank">http://maps.zgb.de/geoserver/gwc/service/wms?BBOX=1176787.0%2C6892762.5%2C1181754.1%2C6899536.0&amp;HEIGHT=625&amp;WIDTH=458&amp;map_resolution=75&amp;SERVICE=WMS&amp;REQUEST=GetMap&amp;STYLES=&amp;TILESIZE=%7B%22w%22%3A256%2C%22h%22%3A256%7D&amp;TRANSPARENT=true&amp;VERSION=1.1.1&amp;FORMAT=image%2Fpng&amp;PROJECTION=EPSG%3A900913&amp;format_options=dpi%3A75&amp;LAYERS=zgb%3Atk50&amp;SINGLETILE=false&amp;SRS=EPSG%3A900913</a>:<br>&gt; Error (status=400) while reading the image from<br>&gt; <a href="http://maps.zgb.de/geoserver/gwc/service/wms?BBOX=1176787.0%2C6892762.5%2C1181754.1%2C6899536.0&amp;HEIGHT=625&amp;WIDTH=458&amp;map_resolution=75&amp;SERVICE=WMS&amp;REQUEST=GetMap&amp;STYLES=&amp;TILESIZE=%7B%22w%22%3A256%2C%22h%22%3A256%7D&amp;TRANSPARENT=true&amp;VERSION=1.1.1&amp;FORMAT=image%2Fpng&amp;PROJECTION=EPSG%3A900913&amp;format_options=dpi%3A75&amp;LAYERS=zgb%3Atk50&amp;SINGLETILE=false&amp;SRS=EPSG%3A900913"
 target="_blank">http://maps.zgb.de/geoserver/gwc/service/wms?BBOX=1176787.0%2C6892762.5%2C1181754.1%2C6899536.0&amp;HEIGHT=625&amp;WIDTH=458&amp;map_resolution=75&amp;SERVICE=WMS&amp;REQUEST=GetMap&amp;STYLES=&amp;TILESIZE=%7B%22w%22%3A256%2C%22h%22%3A256%7D&amp;TRANSPARENT=true&amp;VERSION=1.1.1&amp;FORMAT=image%2Fpng&amp;PROJECTION=EPSG%3A900913&amp;format_options=dpi%3A75&amp;LAYERS=zgb%3Atk50&amp;SINGLETILE=false&amp;SRS=EPSG%3A900913</a>:<br>&gt; Bad Request<br>&gt; pdf error attatchment<br>&gt; java.io.IOException: Error (status=400) while reading the image from<br>&gt; <a href="http://maps.zgb.de/geoserver/gwc/service/wms?BBOX=1091694.4%2C6741760.5%2C1250642.0%2C6958507.0" target="_blank">http://maps.zgb.de/geoserver/gwc/service/wms?BBOX=1091694.4%2C6741760.5%2C1250642.0%2C6958507.0</a><br>&gt; &amp;HEIGHT=625&amp;WIDTH=458<br>&gt; &amp;map_resolution=75&amp;SERVICE=WMS&amp;REQUEST=GetMap<br>&gt;
 &amp;STYLES=&amp;TILESIZE=%7B%22w%22%3A256%2C%22h%22%3A256%7D&amp;TRANSPARENT=true<br>&gt; &amp;VERSION=1.1.1&amp;FORMAT=image%2Fpng&amp;PROJECTION=EPSG%3A900913&amp;format_options=dp<br>&gt; i%3A75&amp;LAYERS=zgb%3Atk50&amp;SINGLETILE=false&amp;SRS=EPSG%3A900913: Bad Request<br>&gt;<br>&gt;<br>&gt;<br>&gt; Can anyone tell me why the mapfish print is requesting tile&nbsp;dimensions &nbsp;of<br>&gt; 625x458?<br>&gt;<br>&gt;<br>&gt; Yours with thanks,<br>&gt; Rob<br>&gt;<br>&gt; _______________________________________________<br>&gt; Users mailing list<br>&gt; <a ymailto="mailto:Users@lists.osgeo.org" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>&gt; <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>&gt;<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; Users mailing list<br>&gt; <a
 ymailto="mailto:Users@lists.osgeo.org" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>&gt; <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>&gt;<br>&gt;<br><br><br> </div> </div>  </div></body></html>