<div dir="ltr">Hello,<br><br>it's works when i used <br><script type="text/javascript" src="<a href="http://localhost:8080/geoserver/pdf/info.json?var=printCapabilities">http://localhost:8080/geoserver/pdf/info.json?var=printCapabilities</a>"></script><br>
thanks<br><br><div class="gmail_quote">2011/5/15 hassane allouch <span dir="ltr"><<a href="mailto:allouch.hassane@gmail.com">allouch.hassane@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr">Hello<br><br>i tried the exemple: <a href="http://api.geoext.org/1.0/examples/print-extent.html" target="_blank">http://api.geoext.org/1.0/examples/print-extent.html</a> (i'm using geoserver 2.1.0)<br>
<br>but i got in the pdf just the title but not the map (i joined it). with the layer <br><pre>("Tasmania", "<a href="http://demo.opengeo.org/geoserver/wms" target="_blank">http://demo.opengeo.org/geoserver/wms</a>",<br>
{layers: "topp:tasmania_state_boundaries"}, {singleTile: true})], <br></pre>it works, but with mine it doesn't<br><br>this is the code:<br><br>var mapPanel, printProvider;<br><br>Ext.onReady(function() {<br>
// The printProvider that connects us to the print service<br>
printProvider = new GeoExt.data.PrintProvider({<br> method: "GET", // "POST" recommended for production use<br> capabilities: printCapabilities, // from the info.json script in the html<br>
customParams: {<br> mapTitle: "Printing Demo",<br> comment: "This is a map printed from GeoExt."<br> }<br> });<br><br> var printExtent = new GeoExt.plugins.PrintExtent({<br>
printProvider: printProvider<br> });<br><br> // The map we want to print, with the PrintExtent added as item.<br> mapPanel = new GeoExt.MapPanel({<br> renderTo: "content",<br> width: 450,<br>
height: 320,<br> layers: [new OpenLayers.Layer.WMS("<div dir="ltr">province", "<a href="http://localhost:8080/geoserver/wms" target="_blank">http://localhost:8080/geoserver/wms</a>",<br>
{layers: "sf:province"}, {singleTile: true})],<br>
center: [-7.50,33.5],<br> zoom: 6,<br> plugins: [printExtent],<br> bbar: [{<br> text: "Create PDF",<br> handler: function() {<br> // the PrintExtent plugin is the mapPanel's 1st plugin<br>
mapPanel.plugins[0].print();<br> }<br> }]<br> });<br> printExtent.addPage();<br>});<br><br><br>thank you</div><br></div>
</blockquote></div><br></div>