<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:10pt;color:#40007f;">Hi,<br><br>i am desperately trying to add a simple printing button to my app. Using this example, I wanted to print the mapPanel with an OSM background, however the map is only 1px and the pdf is broken.<br><br><br>Here is my app..the print button is in the mappanelīs bottom bar.<br><br><span><a target="_blank" href="http://maps.zgb.de:8080/geoserver/www/testing/wea_kataster.html">http://maps.zgb.de:8080/geoserver/www/testing/wea_kataster.html</a> </span><div><br><br>here is my code for the mappanel<br><br>var mapPanel = new GeoExt.MapPanel({<br> // title:
"Map",<br> region: "center",<br> width: 800,<br> map: map,<br> layers: [gsat, ghybrid,mapnik, layer, vr_wea],<br> tbar: [toolbarItems],<br> bbar: [{<br> text:
"Print...",<br> handler: function(){<br> // A window with the PrintMapPanel, which we can use to adjust<br> // the print extent before creating the pdf.<br> printDialog = new Ext.Window({<br> title: "Print Preview",<br>
width: 350,<br> height: 500,<br> items: [{<br> xtype: "gx_printmappanel",<br> // use only a PanPanel control<br>
map: {controls: [new OpenLayers.Control.PanPanel()]},<br> sourceMap: mapPanel,<br> printProvider: printProvider<br> }],<br> bbar: [{<br> text: "Create PDF",<br>
handler: function(){ printDialog.items.get(0).print(); }<br> }]<br> });<br> printDialog.show();<br> }<br> }]<br><br> });<br><br>thanks for any hints,<br><br>Robert<br><br></div>
</div><br></body></html>