<div dir="ltr">Hi again, it is the default MapFish config file, goes below.<div><br></div><div style>Thanks,</div><div style><br></div><div style>Luís</div><div style><br></div><div style><div>#===========================================================================</div>
<div># allowed DPIs</div><div>#===========================================================================</div><div>dpis:</div><div> - 254</div><div> - 190</div><div> - 127</div><div> - 56</div><div><br></div><div>#===========================================================================</div>
<div># allowed Formats</div><div>#===========================================================================</div><div># '*' means any formats</div><div>formats: ['*']</div><div><br></div><div>#===========================================================================</div>
<div># the allowed scales</div><div>#===========================================================================</div><div>scales:</div><div> - 25000</div><div> - 50000</div><div> - 100000</div><div> - 200000</div><div>
- 500000</div><div> - 1000000</div><div> - 2000000</div><div> - 4000000</div><div> - 8000000</div><div> - 16000000</div><div> - 32000000</div><div> - 64000000</div><div><br></div><div>#===========================================================================</div>
<div># the list of allowed hosts</div><div>#===========================================================================</div><div>hosts:</div><div> - !localMatch</div><div> dummy: true</div><div> - !ipMatch</div><div>
ip: <a href="http://www.camptocamp.org">www.camptocamp.org</a></div><div> - !dnsMatch</div><div> host: <a href="http://labs.metacarta.com">labs.metacarta.com</a></div><div> port: 80</div><div> - !dnsMatch</div>
<div> host: <a href="http://demo.mapfish.org">demo.mapfish.org</a></div><div> port: 80</div><div><br></div><div># the default fileName for the files downloaded from the servlet</div><div>outputFilename: MapFish_PrintOut</div>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 3 July 2013 17:18, Alexandre Dubé <span dir="ltr"><<a href="mailto:adube@mapgears.com" target="_blank">adube@mapgears.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hi Luís,<br>
<br>
What does your json config look like ?<span class="HOEnZb"><font color="#888888"><br>
<br>
Alexandre</font></span><div><div class="h5"><br>
<br>
<br>
On 13-07-03 11:15 AM, Luís de Sousa wrote:<br>
</div></div></div><div><div class="h5">
<blockquote type="cite">
<div dir="ltr">
<div>Hi Alexandre, thank you for replying.</div>
<div><br>
</div>
Basically the <span>calculatePageBounds</span> function
is being invoked with the arguments [undefined, "m"] (line 148
in PrintPage.js). This function is not checking if the scale
argument is valid, immediately applying the get method on it,
thus producing an exception.
<div>
<br>
</div>
<div>There might be a reason for the scale argument to
be undefined, but with this exception it is not clear what it
may be.</div>
<div><br>
</div>
<div>Thank you,</div>
<div><br>
</div>
<div>
Luís</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On 2 July 2013 14:19, Alexandre Dubé <span dir="ltr"><<a href="mailto:adube@mapgears.com" target="_blank">adube@mapgears.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hi,<br>
<br>
Try putting a break point in Firebug on that line and
look at what is going on. Look at where this scale
variable is supposed to be instantiated. It should
normally come from the json print param returned by your
print service.<br>
<br>
HTH,<br>
<br>
Alexandre
<div>
<div><br>
<br>
<br>
On 13-07-01 05:39 AM, Luís de Sousa wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div>
<div dir="ltr">Hello again, another developer told
me that the PrintProvider project has issues with
the GET method. I changed it to POST but I'm still
the error at the same place in PrintPage.js.
<div><br>
</div>
<div> Any insights are welcome. Thank you,</div>
<div><br>
</div>
<div>Luís</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On 25 June 2013 11:23,
Luís de Sousa <span dir="ltr"><<a href="mailto:luis.a.de.sousa@gmail.com" target="_blank">luis.a.de.sousa@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>Hello everyone,</div>
<div><br>
</div>
<div>I'm trying to create some basic print
functionality with the code below.
Whenever the printView is called the fit
function is returning back the error in
the subject. This is what I get with
Firebug:</div>
<div><br>
</div>
<pre><div><span>TypeError: scale is undefined</span></div><span></span><div><table cellpadding="0" cellspacing="0"><tbody><tr>
<td>
</td><td><a><pre title="var s = scale.get("value");">var s = scale.get("value");</pre></a><a><div>PrintPage.js (line 298)</div></a></td>
</tr></tbody></table></div></pre>
<div> </div>
<div>Is this a bug or a misconfiguration of
some sorts? Thank you,</div>
<div><br>
</div>
<div>Luís</div>
<div><br>
</div>
<div>////////////////////////////////////////////////////////////////////////////////////////////////////////</div>
<div><br>
</div>
<div>printProvider = new
GeoExt.data.PrintProvider({</div>
<div><span style="white-space:pre-wrap"> </span>url:
"<a href="http://localhost:8080/print2.0" target="_blank">http://localhost:8080/print2.0</a>",</div>
<div> method: "GET",</div>
<div> customParams: {</div>
<div> mapTitle: "Printing Demo",</div>
<div> comment: "This is a simple map
printed from GeoExt."</div>
<div> }</div>
<div>});</div>
<div><br>
</div>
<div>printPage = new GeoExt.data.PrintPage({</div>
<div> printProvider: printProvider</div>
<div>});</div>
<div><br>
</div>
<div>printView = function() {</div>
<div><span style="white-space:pre-wrap"> </span>printPage.fit(mapPanel,
true);</div>
<div><span style="white-space:pre-wrap"> </span>printProvider.print(mapPanel,
printPage, mainView.items[2]);</div>
<div>};</div>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
Users mailing list
<a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a>
<a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><span><font color="#888888">
</font></span></pre>
<span><font color="#888888"> </font></span></blockquote>
<span><font color="#888888"> <br>
<br>
<pre cols="72">--
Alexandre Dubé
Mapgears
<a href="http://www.mapgears.com" target="_blank">www.mapgears.com</a>
</pre>
</font></span></div>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a><br>
<a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<br>
<pre cols="72">--
Alexandre Dubé
Mapgears
<a href="http://www.mapgears.com" target="_blank">www.mapgears.com</a>
</pre>
</div></div></div>
</blockquote></div><br></div>