mapcentia / vidi

Vidi – a modern take on browser GIS. It is the front-end client for GC2.
https://www.osgeo.org/projects/gc2-vidi/
GNU Affero General Public License v3.0
44 stars 24 forks source link

Print with PNG in A3 (maybe A1 aswell?) fails #288

Open giovanniborella opened 4 months ago

giovanniborella commented 4 months ago

https://github.com/mapcentia/vidi/blob/eca81f7eb6029c7750eae3aefef98dfa08055b75/controllers/print.js#L264-L267

When printing with format PNG, we sometimes get decimal numbers in the puppeteer arguments - which results in an error.

We added this before page.emulate:

    // Make sure width and height are integers
    width = Math.round(width);
    height = Math.round(height);