Bug report #17622

[Print composer] "Crop to content" when exporting adds a black band when items are not placed on the paper

Added by Harrissou Santanna about 7 years ago. Updated almost 6 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Map Composer/Printing
Affected QGIS version:3.5(master) Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:25519

Description

Open a print composer
Add items
Add an item out of the paper area
Export to image with the "crop to content" option checked.
You get a black band when out of the paper frame.
Note that when the item placed out of the paper does not have a transparent background, the black band does not cover this item.

croppedLayout.png (206 KB) Harrissou Santanna, 2019-01-21 06:10 PM

History

#1 Updated by Jürgen Fischer almost 6 years ago

  • Status changed from Open to Feedback

Please test with QGIS 3.4 - QGIS 2.18 reached it's end of life.

#2 Updated by Harrissou Santanna almost 6 years ago

  • Affected QGIS version changed from 2.18.14 to 3.5(master)
  • Status changed from Feedback to Open
  • File croppedLayout.png added

Still applies to 3.5.

#3 Updated by Nyall Dawson almost 6 years ago

  • Status changed from Open to Feedback

It's because you are saving as JPG, which does not support opacity. Try PNG instead.

#4 Updated by Harrissou Santanna almost 6 years ago

  • Status changed from Feedback to Open

That means that a bigger than paper rendering with "crop to content" is not desirable for some formats. Might be worth mentioning this somewhere.

#5 Updated by Nyall Dawson almost 6 years ago

  • Status changed from Open to Feedback

So it's a documentation issue?

#6 Updated by Harrissou Santanna almost 6 years ago

  • Status changed from Feedback to Open

Maybe (see https://github.com/qgis/QGIS-Documentation/pull/3483) but I'm not convinced that people ever read docs and, the layout component is the part of QGIS where no help button is available, not a single one. So for doc visibility...
I thought about a warning message (in bar?) but no idea when to raise it, nor whether it's better.

Also available in: Atom PDF