<div dir="ltr"><div style>Hi Alexandre, thank you for replying.</div><div><br></div>Basically the <span class="">calculatePageBounds</span> function is being invoked with the arguments [undefined, &quot;m&quot;] (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 style>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 style><br></div><div style>Thank you,</div><div style><br></div><div style>
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">&lt;<a href="mailto:adube@mapgears.com" target="_blank">adube@mapgears.com</a>&gt;</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 class="h5"><br>
      <br>
      <br>
      On 13-07-01 05:39 AM, Luís de Sousa wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div class="h5">
      <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&#39;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">&lt;<a href="mailto:luis.a.de.sousa@gmail.com" target="_blank">luis.a.de.sousa@gmail.com</a>&gt;</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&#39;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(&quot;value&quot;);">var s = scale.get(&quot;value&quot;);</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: &quot;<a href="http://localhost:8080/print2.0" target="_blank">http://localhost:8080/print2.0</a>&quot;,</div>
              <div>    method: &quot;GET&quot;,</div>
              <div>    customParams: {</div>
              <div>        mapTitle: &quot;Printing Demo&quot;,</div>
              <div>        comment: &quot;This is a simple map printed from
                GeoExt.&quot;</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 class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
    </font></span></blockquote><span class="HOEnZb"><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">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>