Bug report #3250

Vector layers printed/exported as rasters, even when "Print as Raster" is unchecked

Added by Alister Hood over 13 years ago. Updated about 11 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:-
Affected QGIS version:master Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:worksforme
Crashes QGIS or corrupts data:No Copied to github as #:13310

Description

Print or export to PDF from the composer:
Any vector layers will be rasterized in the output.

Perhaps the current behaviour is a workaround for the bug in QT (or whatever it was) that prevented layers from being clipped to the visible region... Is it?

document1.pdf - partly rasterised print output (89.8 KB) Alister Hood, 2011-05-03 12:56 AM

document2.pdf - sorry, forgot document2.pdf (56.5 KB) Alister Hood, 2011-05-03 03:31 AM

Associated revisions

Revision 55a1778b
Added by Jürgen Fischer almost 13 years ago

other workaround for Qt#5114 (fixes #3250, #3028, #2598)

Revision 908a494b
Added by Jürgen Fischer almost 13 years ago

other workaround for Qt#5114 (fixes #3250, #3028, #2598)

History

#1 Updated by Alister Hood over 13 years ago

Wait...
Exporting to PDF always behaves as described.
Printing doesn't seem to now, although I'm pretty sure it did before I restarted QGIS...

#2 Updated by Marco Hugentobler over 13 years ago

Cannot reproduce this. Exporting a line layer to PDF and opening in inkspace showed the lines to be vector.
Note that point marker symbols are sometimes printed as raster (new symbology svn markers should be vector though)

#3 Updated by Alister Hood over 13 years ago

It is with line and polygon layers.
I'm getting the same results on two different computers, with 1.5, 1.6 and trunk, and with new and old symbology. Both machines are running Windows.
I guess I'd better find a machine to do a clean install on... maybe that will show up a setting that affects it.

#4 Updated by andskog - over 13 years ago

Also an issue here. Running 1.6 on two computers (W7 and XP). Same result with QG 1.5. It workes just fine in 1.4, however.

#5 Updated by Alex Mandel almost 13 years ago

I have done further testing on this issue under QGIS 1.6 and QGIS Trunk e5863992 (SVN r15131). I can confirm that this bug happens on windows and not linux. I tried both new and old symbology, but have not yet tried only point, line or polygon one at a time yet.

Here's a link to an easy to use simple dataset and example pdfs made on windows and linux.
http://blog.wildintellect.com/files/qgisbug/

I think this issue would be more minor if the SVG export was better, though I think fixing he pdf export might be more realistic. I am changing the Priority, for several Windows users I know this is a major deal breaker as it really impedes their ability to make quality maps without pdf as vector or svg that clips to extent and preserves scale.

#6 Updated by Alister Hood almost 13 years ago

without pdf as vector

Have you tried printing to a virtual pdf "printer"? That produces vector output for me now...

svg that clips to extent and preserves scale

Scale should be preserved now - see #3224

Is clip-to-extent necessary simply to minimise file size? Personally I'm quite happy now with exporting to svg and then printing the svg to PDF. But of course it would be much better not having to do a two-step process...

#7 Updated by Alister Hood almost 13 years ago

Have you tried printing to a virtual pdf "printer"? That produces vector output for me now...

Sorry, no, I'm wrong. It doesn't anymore - printing rasterizes everything. So my original description for this bug is accurate again.

have not yet tried only point, line or polygon one at a time yet

I've tried that, but only with new symbology. It is always rasterised.

#8 Updated by Alister Hood almost 13 years ago

Ah. But it is affected by other things on the layoout e.g. if an arrow overlaps the map then part of the map is rasterised. If a basic shape overlaps the map then the whole map is rasterised.
Also svg images are partly rasterised (I guess it depends on the layers inside the svg).
See attached example.

#9 Updated by Alister Hood almost 13 years ago

Sorry, no. It is more complicated than that.

If a basic shape overlaps the map then the whole map is rasterised.

No, this isn't correct - see document2.pdf

Also svg images are partly rasterised (I guess it depends on the layers inside the svg).

I see this wasn't demonstrated in document1.pdf - more of the svg was rasterised than I expected (I guess due to the svg being in line with the basic shape or something). See document2.pdf instead.

I don't think I'm achieving anything here ;)

#10 Updated by Alister Hood almost 13 years ago

This should possibly be marked as duplicate of #3480

Also IIRC there is a bug where map labels cause any vector layers they overlap to be rasterised (or partly rasterised).

#11 Updated by Alex Mandel almost 13 years ago

Replying to [comment:6 Alister]:

without pdf as vector

Have you tried printing to a virtual pdf "printer"? That produces vector output for me now...

I will double check but the last time I did so to PDF Creator it was still rasterized.

svg that clips to extent and preserves scale

Scale should be preserved now - see #3224

Is clip-to-extent necessary simply to minimise file size? Personally I'm quite happy now with exporting to svg and then printing the svg to PDF. But of course it would be much better not having to do a two-step process...

1. it's a lot of work to manually hide lines that cross the neatline of the map (maps are not always full page)
2. not necessarily file size but the related number of vectors/nodes has a huge impact on the behavior and stability of Inkscape and Illustrator. We found that using Natural Earth data if you only wanted to export 1-3 countries as part of your map SVG would leave you with 90% of the world as extra data. One could clip everything in QGIS before export but that seems to defeat the purpose of the map composer (however it is a suggested workaround.

I need to go back and check more about Labelling since we also need labels to come out as Text objects in both SVG and PDF unless a user explicity chooses to convert text to paths. Either way it should never be rasterized.

#12 Updated by Alister Hood almost 13 years ago

I need to go back and check more about Labelling since we also need labels to come out as Text objects in both SVG and PDF unless a user explicity chooses to convert text to paths. Either way it should never be rasterized.

"new" labelling is always rasterized - this is not a glitch, but the way it is designed. I'm pretty sure there is a ticket requesting it to be output as text, but I can't find it in a hurry.

#13 Updated by Alister Hood over 12 years ago

  • Pull Request or Patch supplied set to No
  • Assignee deleted (nobody -)

Alister Hood wrote:

I need to go back and check more about Labelling since we also need labels to come out as Text objects in both SVG and PDF unless a user explicity chooses to convert text to paths. Either way it should never be rasterized.

"new" labelling is always rasterized - this is not a glitch, but the way it is designed. I'm pretty sure there is a ticket requesting it to be output as text, but I can't find it in a hurry.

Sorry, I meant they are not currently designed to be text. They aren't rasterized in current Trunk.

#14 Updated by Alister Hood over 12 years ago

Does anyone still have a problem with this, or can we close the ticket?
On current trunk I only have a problem when using the map book function of the easy print plugin:
http://code.google.com/p/cataisrepository/issues/detail?id=6

#15 Updated by Giovanni Manghi over 12 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#16 Updated by Paolo Cavallini about 12 years ago

  • Target version changed from Version 1.7.4 to Version 1.8.0
  • Affected QGIS version set to master
  • Crashes QGIS or corrupts data set to No

#17 Updated by Paolo Cavallini over 11 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#18 Updated by Victor Axbom about 11 years ago

Not sure if it's the same problem. But I can't get layers with the line pattern fill to render as vector when I export to pdf. Anybody else experience the same issue? Both master and 1.8 is affected for me on Win XP.

Alister Hood wrote:

Does anyone still have a problem with this, or can we close the ticket?
On current trunk I only have a problem when using the map book function of the easy print plugin:
http://code.google.com/p/cataisrepository/issues/detail?id=6

#19 Updated by Davide Pascutti about 11 years ago

Victor, I have exactly the same problem: line fills are rasterized when exporting to pdf.
I tried exporting to other vector format (pdf, svg, eps), I also tried using an external pdf printer but had no luck.
Any idea?
I'm using QGIS 1.8.0 on Win XP.

#20 Updated by Victor Axbom about 11 years ago

Guess the problem is not really a bug as the line pattern fill seems to be implemented to create a raster fill. The function creates a texture with lines to be used as a Qt::TexturePattern custom brush. I'm not sure, but I guess it's not possible to get a vector line pattern fill with the current implementation then.

#21 Updated by Alister Hood about 11 years ago

the line pattern fill seems to be implemented to create a raster fill

Then that is a bug.

See discussion at #3430 and https://github.com/qgis/Quantum-GIS/pull/210

As Marco said: "Qt brush styles aren't suitable for printouts because they can't be scaled".
I guess it might make sense to close this ticket and open a new one about the line pattern file.

#22 Updated by Victor Axbom about 11 years ago

Hmm, you are right. That don't seem to be the intention then
There is already a ticket for the problem #6996

Alister Hood wrote:

the line pattern fill seems to be implemented to create a raster fill

Then that is a bug.

See discussion at #3430 and https://github.com/qgis/Quantum-GIS/pull/210

As Marco said: "Qt brush styles aren't suitable for printouts because they can't be scaled".
I guess it might make sense to close this ticket and open a new one about the line pattern file.

#23 Updated by Alister Hood about 11 years ago

  • Resolution set to worksforme
  • Status changed from Open to Closed
  • Status info deleted (0)

I think we might as well close this ticket.

Also available in: Atom PDF