In QGIS 3.2, I have a map with parks/other green areas to be displayed as a simple vector point pattern fill. No matter what I do, the pattern fill is always exported to PDF as raster data, which is pretty annoying.

Any suggestions how to change this behaviour?

  • 1
    What have you already tried? Do you want to use a script oder just use print composer to export?
    – Dirk
    Commented Jul 22, 2018 at 12:10
  • So far, I have only tried to export using the print composer. If there's a scripting solution, I would try it - but so far I don't have that much experience with scripting in QGIS...
    – winnewoerp
    Commented Jul 23, 2018 at 4:20

2 Answers 2


This isn't currently possible - point pattern and line pattern fills are always rasterised when rendered, regardless of the output type and settings. See https://issues.qgis.org/issues/6996.


This can help you / us!


To make the code usable in QGIS 3, change in function editor the line 41 to QgsPointXY(ptX,ptY), line 42 QgsGeometry.frompointXY(pt) and line 46 return QgsGeometry.fromMultiPointXY(points)

If you don't want randomness, set the third parameter to 0 of the new exrpression.

The output PDF pattern fill will be vectorized!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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