<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi,</div>
<div> </div>
<div>after a lot of trying and reading i found the solution that seems to work:</div>
<div>var printProvider = Ext.create('GeoExt.data.MapfishPrintProvider',{<br/>
method: "GET", // "POST" recommended for production use<br/>
url: 'http://localhost:8080/Portal_Prototype/cgi-bin/proxy.cgi?url=http://norderney:8080/geoserver/pdf/',<br/>
autoLoad: true,</div>
<div> </div>
<div>Maybe somebody can update the documentation, that point out more clearly that autoLoad has! to be set. And a lot of problems are related to this stupid cross-site-scripting.</div>
<div>I would like to share my experiences with setting up this "quite simple" example. Maybe somebody can tell me where and how it would be best or i write a document an an experienced user checks it. At least for beginners there are a lot of traps, like do not remove CustomParams and when remove them in config.yaml too, add urls there, etc. </div>
<div> </div>
<div>At the end, <span style="font-family: Verdana, sans-serif, Arial, 'Trebuchet MS'; font-size: 13px; line-height: 1.6em;">how can i set the resolution, because my maps are looking quite pixelated.</span></div>
<div>setting in the printProvider:</div>
<div>dpi: 300, </div>
<div>is not accepted, as it takes the default value.</div>
<div> </div>
<div>Thanks and cheers</div>
<div>Christian</div>
<div>
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Mittwoch, 24. April 2013 um 12:57 Uhr<br/>
<b>Von:</b> "Bernhard Kiselka" <bernhard.kiselka@prisma-solutions.at><br/>
<b>An:</b> "cromail@gmx.de" <cromail@gmx.de><br/>
<b>Cc:</b> "users@geoext.org" <users@geoext.org><br/>
<b>Betreff:</b> print page</div>
<div name="quoted-content">Hallo/Hello Christian!<br/>
<br/>
Durch das auskommentieren von<br/>
http://norderney:8080/geoserver/pdf/info.json?var=printCapabilities<br/>
musst du nun die Variable printCapabilities nun selbst befüllen, z.B.:<br/>
printCapabilities={"scales":[{"name":"1:100","value":"100"},{"name":"1:250","value":"250"},{...<br/>
bzw. eben auch direkt vom Server holen<br/>
<br/>
By commenting<br/>
http://norderney:8080/geoserver/pdf/info.json?var=printCapabilities<br/>
you need to sete printCapabilities manually, e.g.<br/>
printCapabilities={"scales":[{"name":"1:100","value":"100"},{"name":"1:250","value":"250"},{...<br/>
or get it from the server.<br/>
<br/>
lg<br/>
Bernhard<br/>
<br/>
-----Ursprüngliche Nachricht-----<br/>
Hallo,<br/>
<br/>
<br/>
<br/>
ich versuche gerade das Print Beispiel umzusetzen (<a href="http://api.geoext.org/1.1/examples/print-page.html" target="_blank">http://api.geoext.org/1.1/examples/print-page.html</a>) bzw. die Umsetzung mit GeoExt2 (<a href="https://github.com/geoext/geoext2/tree/master/examples/printpage" target="_blank">https://github.com/geoext/geoext2/tree/master/examples/printpage</a>) auf meinem Geoserver 2.3.<br/>
<br/>
Das Beispiel l?uft auch in der Originalversion. Nur wenn ich versuche die info.json direkt im printProvider zu laden bekomme ich immer folgenden Fehler:<br/>
<br/>
TypeError: scale is undefined<br/>
<br/>
<chrome://firebug/content/blank.gif><br/>
<br/>
var s = scale.get("value");<br/>
<br/>
PrintPage.js (Zeile 320)<br/>
<br/>
<br/>
<br/>
Meine ?nderungen:<br/>
<br/>
in der print-page.html habe ich das laden auskommentiert:<br/>
<br/>
<!--script type="text/javascript" src="http://norderney:8080/geoserver/pdf/info.json?var=printCapabilities"></script--><br/>
<br/>
<br/>
<br/>
und in der print-page.js versuche ich nun die info.json direkt zu laden:<br/>
<br/>
launch: function() {<br/>
// The MapfishPrintProvider that connects us to the print service<br/>
printProvider = Ext.create('GeoExt.data.MapfishPrintProvider', {<br/>
method: "GET", // "POST" recommended for production use<br/>
url: "http://norderney:8080/geoserver/pdf/info.json?",<br/>
//capabilities: printCapabilities, // from the info.json script in the html<br/>
customParams: {<br/>
mapTitle: "Printing Demo",<br/>
comment: "This is a simple map printed from GeoExt."<br/>
}<br/>
});<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
Ich versteh das nicht wirklich, da das Beispiel oben einkommentiert, unten capabilities einkommentiert, url raus ja funktioiert. Und so wie ich die Doku verstehe, soll das laden per URL ja auch der bessere Weg sein.<br/>
<br/>
<br/>
<br/>
Danke und sch?ne Gr??e<br/>
<br/>
Christian</div>
</div>
</div></div></body></html>