3

When exporting a map that make use of label blending in QGIS 3, only when exporting as PNG is the blending kept. If I try exporting it to SVG or PDF, the blending is lost.

Is there any way to export to SVG or PDF while conserving the blending mode of layers that make use of it? The image below illustrates the actual (left) versus the expected (right) results.

Expected result on the right

The only fixes I have found so far are either to manually add the blending afterwards in Inkscape (but it's time-consuming and the text is also blended), or to purposefully overlap two layers, one with the shadow background and one with the text, so that only the shadow background layer can be blended in Inkscape (but I haven't managed to do so in QGIS).

5
  • Please edit your post so it contains the specific settings you're using, thank you. – Erik Aug 18 '20 at 8:58
  • What settings would you need? Regarding the blend mode, it's: - under Layer Labeling Options -> Background, Blend Mode set as "Multiply" – Actinium-k Aug 18 '20 at 9:55
  • And setting a transparent background does not suffice? – Erik Aug 18 '20 at 9:58
  • Unfortunately, no. Multiply is an effect different than transparency. – Actinium-k Aug 18 '20 at 10:27
  • Changing the opacity of the orange color should help. "Multiply" blending mode is not possible. – christoph Aug 18 '20 at 10:34
3

It seems that blending modes without rasterization are not currently supported.

Because of some advanced rendering options (blending mode, effects…), a layout item may need rasterization in order to be exported correctly. QGIS will individually rasterize it without forcing every other item to also be rasterized. This allows printing or saving as PostScript or PDF to keep items as much as possible as vectors, e.g. a map item with layer opacity won’t force labels, scale bars, etc to be rasterized too. You can however:

  • force all the items to be rasterized checking the checkbox Print as raster box;
  • or use the opposite option, i.e. Always export as vectors, to force the export to keep items as vectors when exported to a compatible format. Note that in some cases, this could cause the output to look different to layout.

https://docs.qgis.org/3.10/en/docs/user_manual/print_composer/overview_composer.html#export-settings

If you force all the layers to be exported as vectors and then in Inkscape you can make things less painful by using the edit paths by nodes tooledit paths by nodes to select one of the background masks. Then Edit>Select Same>Fill and Stroke to select all of them. And finally in the object panel change the blending mode to multiply. This only changes the blending mode of the background mask not the text. bulk_change

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.