question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Print dpi problem with QGIS Server

See original GitHub issue

Originally discussed in https://github.com/camptocamp/ngeo/issues/2654

1°/ Go to https://preprod.cartoriviera.ch/s/Hvds 2°/ Do a print on the red lines -> symbols are too small in PDF result

The problem is that the print in the CGXP interface doesn’t use the server type; the value is fixed to mapserver. See: https://github.com/camptocamp/cgxp/blob/master/core/src/script/CGXP/plugins/Print.js#L344-L347

@fredj says: Need to be checked with @ger-benjamin and @sbrunner but the following code could be added to the project to set the correct serverType when encoding the wms layer:

printProvider.on('encodelayer', function(printProvider, layer, encodedLayer) {
  if (encodedLayer.baseURL.indexOf('qgis') > -1) {
    Ext.apply(encodedLayer, {
      serverType: 'qgisserver'
    }
  });
});

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Bug report #7927: composer fails to export with high dpi ...
Hi, QGIS doesn't export any image beyond a given dpi resolution. For A0 maps with lots of raster and transparency, I can't export...
Read more >
QGIS print layout (large size printed image)
In the layout composer of QGIS I have tried to set the sizes of the image even at 2m and then I saved...
Read more >
[QGIS-Developer] WMTS/XYZ on high DPI screens
I can see the following options for what a data provider can offer: > > * A predefined set of available DPI from...
Read more >
Printing and exporting maps containing service layers—Help
However, this does not come without cost—an increase in dpi will result in a request to the server for a larger image, which...
Read more >
Map layers based on a WMS Image Service disappear when ...
Since WMS layers are treated as raster data, the amount of data requested depends on the target DPI and Output Image Quality. Lower...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found