Bug report #17399

GetPrint "Invalid width/height parameters" error

Added by Éric Lemoine about 7 years ago. Updated about 7 years ago.

Status:Closed
Priority:Normal
Assignee:Paul Blottiere
Category:QGIS Server
Affected QGIS version:master Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:25296

Description

I get an error when attempting to print from QWC2:

createImage: Invalid width / height parameters

The error is an HTML page sent by QGIS Server:

<html><body>createImage: Invalid width / height parameters</body></html>

The request is a POST request.

Here are the headers:

Accept  text/html,application/xhtml+xm…plication/xml;q=0.9,*/*;q=0.8
Accept-Encoding gzip, deflate
Accept-Language fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
Authorization   Basic cGFnZ2Y6cGFnZ2Y=
Cache-Control   max-age=0
Connection  keep-alive
Content-Length  688
Content-Type    application/x-www-form-urlencoded
Host    localhost:8080
Referer http://localhost:8080/?st=&e=3…timents%2Cparcelles%2Csommets
Upgrade-Insecure-Requests   1
User-Agent  Mozilla/5.0 (X11; Linux x86_64…) Gecko/20100101 Firefox/58.0

And here are the POSTed parameters:

DPI 300
FORMAT  pdf
LAYERS  sous_collines,provinces,communes,collines,routes,rivieres,batiments,parcelles,sommets
map%s:extent    3311201.7395833344,-404316.7715009731,3372406.5208333344,-355371.9121259731
map%s:GRID_INTERVAL_X   1000
map%s:GRID_INTERVAL_Y   1000
map%s:HIGHLIGHT_GEOM    
map%s:HIGHLIGHT_LABELBUFFERCOLOR    white
map%s:HIGHLIGHT_LABELBUFFERSIZE 1
map%s:HIGHLIGHT_LABELCOLOR  black
map%s:HIGHLIGHT_LABELSTRING 
map%s:HIGHLIGHT_SYMBOL  
map%s:rotation  5
map%s:scale 265625
OPACITIES   255,255,255,255,255,255,255,255,255
REQUEST GetPrint
SERVICE WMS
SRS EPSG:3857
TEMPLATE    Carte
TRANSPARENT true
VERSION 1.3

The same request worked with QGIS Server 2.18, so that looks like a regression in QGIS Server 3.

Associated revisions

Revision edf9755c
Added by Paul Blottiere about 7 years ago

Fixes #17399 GetPrint doesn't need a proper image with width/height

Revision 67f84654
Added by Paul Blottiere about 7 years ago

Merge pull request #5520 from pblottiere/server_bugfix_width_height

[server][bugfix] Fixes #17399 WIDTH and HEIGHT parameters are not mandatory for GetPrint

History

#1 Updated by Paul Blottiere about 7 years ago

  • Assignee set to Paul Blottiere

#2 Updated by Paul Blottiere about 7 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF