This question already has an answer here:

I am using QGIS Desktop 2.8.5 on a windows machine and I am using the composer tool to create images with a scalebar and legend. The following is a screenshot of the my working environment:

Screenshot of working environment

The image above appears exactly how I would like.

Now, when I export as a PDF, the resulting image is:

Screenshot of PDF export

And when I export as an image (tiff, jpg, png), the resulting image is similar (my reputation is <10 so I cannot upload a third image).

In both cases, the exported image is distorted from the original. I've tried to export the image several times and the amount of distortion varies each time. I have also tried to use a different computer (also Windows with 2.8.5) and I get the same results.

Why is this happening and how can I remedy it?

marked as duplicate by underdark qgis Mar 27 '16 at 21:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    are you using OpenLayer for basemap(google map or something) ? make sure your points (your vector) has same CRS with your basemap CRS. – Uje Indo Mar 25 '16 at 21:40
  • I was using OpenLayer (google) with the same CRS. I switched to QuickMapServices and that has resolved the issue. However, this doesn't solve the underlying problem of why OpenLayer doesn't work with composer. It seems this has been documented: link – DrDunkenstein Mar 26 '16 at 15:55
  • check Why do OpenLayers layers appear shifted in map composer ? . I think its related to the issue that occured. – Uje Indo Mar 26 '16 at 17:40
  • Thanks for the link. Unfortunately, the only way I could get this to work was to switch from OpenLayers to QuickMapServices. @PolyGeo, I don't understand why this is marked as a duplicate question. That link does not contain a reasonable solution to the problem, but rather, some hacks/workarounds, none of which worked for me. What's worse is that this bug was found in OpenLayers before 2012 and is still not fixed. – DrDunkenstein Mar 27 '16 at 19:36
  • I suspect this is a duplicate of gis.stackexchange.com/q/42044/115 under the site rules but I've re-opened it to allow others more familiar with that functionality to perform their assessments. – PolyGeo Mar 27 '16 at 20:22

You may need to set the size of the page on the composition tab of the Composer to a size the image will fit within. Also, if you have changed the size of the map after you set the size of the composition, you may need to resize the map to fit the page you wish to export.

This is how my composer looked when I initially set the size to be A4


This is the PDF view of the same composer image that was set to A4


I then changed the size of the page to an 8.5 x 11, without resizing the map to fit the page, and this is the PDF view of the exported composer image.

PDF View 8x11

I do not know if that is what is going on with your situation, but that is the only way that I am able to make that happen.

As for the shift of the vector data, that is a new one on me. I have never seen that one before.

I am using QGIS 2.14.0 on a 32 bit computer.

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