Questions tagged [print-composer]
Print composer provides growing layout and printing capabilities in QGIS.
1,298
questions
0
votes
0
answers
17
views
Setting legend font and color on multiple projects (QGIS) [closed]
I have around 60 QGIS projects (QGZ), each with a Print Layout generated (they're all the same layout) and I need to change the font and font color of the legend items (headings, labels...).
Is there ...
1
vote
0
answers
35
views
PyQGIS Print Layout - Duplicating style from another map when it's locked
Print Layout from a Template with two maps of the same layer, but different styling.
My code perfectly works for the first map:
#1
#getting map ID from the layout
map1 = layout.itemById('mapId_1')
#...
0
votes
0
answers
26
views
QGIS Composer template between projects
I'm trying to create a composer template in QGIS 3.24 which can be used across multiple projects.
My font settings, however, seemingly randomly reset and default back to MS Shell dg font size 10 when ...
2
votes
1
answer
33
views
Sharing changes to all layouts on QGIS
Currently, I'm working on a project that has multiple print layouts, each displaying specific information and layers of the project, but with the same map elements such as the title, legend, and grids,...
0
votes
0
answers
19
views
Error while inserting attribute table to Layout using PyQGIS
I am trying to insert a qgis attribute table to a layout using Visual Studio Code, how would I do it?
layout = project.layoutManager().layoutByName('nombre_layout')
table = ...
3
votes
1
answer
69
views
Running Python code easily for end users in QGIS
I have a basic bit of code that updates layout names to help manage revisioning and PDF names etc.
Currently, it is run from the project Python actions - so it runs whenever the project is saved, this ...
2
votes
1
answer
57
views
QGIS layout models: problem from 3.28 to 3.22
I have different layout models, that I build in 3.22. I can use them in the new LTR (3.28).
But the problem is if I open the project in 3.22 (some computers in my office are still in 3.22), all the ...
2
votes
0
answers
26
views
QGIS Atlas generate QR code from map center does not refresh automatically
I'm using QR-Codes generated dynamically inside an HTML element on the atlas-maps in QGIS. The map has the id:map2 and the QR-code gives the quickest route to this place using Google Maps. This works ...
3
votes
2
answers
104
views
Is there any way to link the current map scale in the print layout to a text box?
Is there any way to link the current map scale in the print layout?
I know you can do something similar with the the date by entering $CURRENT_DATE(yyyy-MM-dd) into the text box.
0
votes
0
answers
23
views
Fill a column box selection with atlas_pagename in QGIS
I am trying to dynamically fill a box with a column that has the same name as the atlas_pagename. I attempted to use eval(atlas_pagename) but was unsuccessful.
Does anyone have any tips or ...
0
votes
0
answers
16
views
QGIS layout template font appearance
I've made a layout template in QGIS 3.26.2-Buenos Aires. When my colleague opens the layout on their PC the font appearance seems to have reverted to default. This is happening for text and dynamic ...
0
votes
0
answers
33
views
Inset map in Print Composer in QGIS using irregular shapes
I have been trying, unsuccessfully, to create an inset map in the Print Composer (via the Add New Map button) but, instead of it having the shape of the viewport main canvas, I would like it to have ...
0
votes
0
answers
20
views
Change line width dynamically based on text width
How can you let the width of a vertical line change based on the width of the text in a label in the print composer? (Not looking for the underlined text style.)
An example of a line that underlines ...
1
vote
0
answers
19
views
QGIS Composer not rendering HTML
The title. When I select the "Render as HTML" option on a text box on the Layout Composer, the text disapears.
I only found a QGIS bug report from some years ago, mentioning that it might ...
1
vote
1
answer
54
views
Setting layout legend style in PyQGIS
I have tried to set the legend style but all methods I had tried were error, there is one example I tried to change the font style of legend:
legend = QgsLayoutItemLegend(layout)
legend.setTitle("...
0
votes
0
answers
13
views
Using Best fit scale for atlas map with clipped boundary
I'm using the atlas layout feature with a Map that has a clipped boundary.
Map is controlled by Atlas with a predefined (best fit) scale.
The map doesn't recognize that it's clipped and some of the ...
1
vote
1
answer
41
views
QGIS 3.28.3 Custom Print layout: Problems with changing rectangle sizes
I'm part of a GeoOffice and we want to create a custom print layout for the finished maps. This custom print layout should include a "stamp" in the lower right corner with all the needed ...
0
votes
2
answers
42
views
Hiding specific symbol layer in layouts using QGIS
Is there a way to hide a specific "symbol layer" when in the layout window?
I have a point layer where the points are marked with two "symbology layers":
symbology layer 1: single ...
0
votes
0
answers
29
views
Setting specific layer colors in print layout using QGIS [duplicate]
We are working on a quite complex task in QGIS containing multiple layer groups. We need to show the same layers in different print layouts, but with a different color scheme.
Is there a way to solve ...
0
votes
1
answer
34
views
Adapt label box size to text length in layout composer
In the layout composer I want to add a title in black text with a white background.
My title will be dynamic and I want the text box ("label" in the composer) to automatically adapt its size ...
0
votes
1
answer
45
views
Partial and Total Sum in one table (QGIS print composer)
In QGIS 3.22.14, I'd like to present in the print composer a sub- and total sum in one table. The values in the attribute table can be anything (area, count, etc.), the key is to present them in one ...
2
votes
1
answer
59
views
How do I remove unexpected white space in a layout?
When I export a relatively simple layout to PDF I keep getting a section with random block of the blue ocean background left out.
I have tried to re-export the layout several times after slightly ...
0
votes
0
answers
8
views
How to set the Default Patch Height?
I am wondering how I can set the Default Patch Height in QGIS Layout Composer (version 3.28.1)? This is where I do it manually,
I have to change this for every map I make. Even if it's the same ...
1
vote
1
answer
55
views
Adding group items to Layout legend using PyQGIS
I want to add to the Print Layout Legend groups, subgroups, and layers using PyQGIS like in the picture:
But I can only add layers:
root = QgsLayerTree()
layers_ = self.qgis_project.mapLayers()....
3
votes
1
answer
85
views
Defining and altering the extent of a map in print layout of QGIS
How can I change the extent of a map in print layout to be a custom-sized region. I would like to be able to drag the handles of of the bounding box to resize them so that they touch the purple box. ...
4
votes
1
answer
83
views
QGIS Print Composer only label with visible features
I am curious if there is a way to get all features from a certain layer that are visible in the current map. I am aware that this could be done using the checkbox in the attribute table object but I ...
2
votes
3
answers
91
views
Use QGIS Geometry Generator to expand overview map frame
I have a QGIS (3.16) map layout (maps generated using Atlas) that I have created a map inset, which shows the full extent of the state. Within it, I have an "overview" frame that shows the ...
2
votes
0
answers
29
views
QGIS use sheetlines for atlas automatic map extent
I have sheetline geometries for the German TK50 1:50.000 map extents. I now want to create an atlas for the geometries. So far no problem, I have this working.
But the sheetline geometries cover 40' ...
3
votes
1
answer
65
views
Expression to retrieve image from local directory in QGIS layout
I'm currently doing a project where I have to put 8 images, per page, on a layout that I previously created (as shown in the image below). My image files are always named 01, 02, 03, etc and I was ...
2
votes
0
answers
42
views
Adding auto-updating expressions to legend in QGIS
I am trying to add an expression to a legend item in my print layout that auto-updates when values in the field change.
Essentially, I have a layer with a field which calculates the length of each ...
0
votes
1
answer
29
views
Plot widget in QGIS 3.24 print composer is not plotting in the correct order
I am using the plot widget to include a profile in my Qgis print composer map atlas output.
It refers to a layer with distance along (a straight) line and depth attributes as well as the geographic ...
0
votes
0
answers
21
views
Composer Template: new map keeps old position and scale [duplicate]
I've made a Composer Template that includes a map.
When I use that template with another project, the new map is loaded, but the view is set to the old coordinates/position and the old scale of the ...
0
votes
1
answer
42
views
QGIS export as SVG, but restrict to full project extent
I have a project that includes a shapefile of the boundary for the state of Delaware. In the project properties I have set the project to the bounds desired.
What I want to accomplish is export the ...
1
vote
0
answers
31
views
PyQGIS FlowChart - Python
I'm trying to create an ArcGis Flowchart. I've read the Developers CookBook and I couldn't grasp almost anything.
What I'm trying to do is using some data that I already have, to create n rectange, n ...
2
votes
1
answer
43
views
Is it possible to keep rotation values relative to the north in line pattern fill when making a print layout with rotation in map?
I have a polygon that I am displaying with Line pattern fill.
The orientations of the pattern fill is set by an attribute in the file with the value of the angle rotation.
I am creating a print layout ...
3
votes
1
answer
67
views
QGIS layout composer always loads small, zoomed-out page
QGIS 3.22.8 (but has occurred in previous versions too).
I have a couple of Layout templates saved to my project. Each time I open one, they appear small like so:
For sure, I can press this 'Zoom ...
2
votes
2
answers
77
views
QGIS Font size changing in Layout Window
I am having a problem with the font size of labels changing in the layout window. Any font size above 12pt saves and prints okay but if I drop to 12pt, the font size dramatically reduces in size and ...
2
votes
0
answers
35
views
How to stop update original map when I add new map in QGIS3.26 layout
I want to create a map with multiple map to show different layers like this:
And in the map1, I checked the "Lock layers" and "Lock styles for layer" option
But when I just use ...
0
votes
1
answer
29
views
QGIS Y-Axis grid repeating values
I've set up a grid on a map in print layout. The X-axis labels are working correctly but the y axis is repeating the results:
The options selected are shown in the following two photos:
1
vote
1
answer
27
views
Display feature count in legend by map extent using mask and atlas plugins in print composer
I'm trying to generate thematic maps from point layers representing citizen requests using QGIS's Atlas map composer plugin as well as the Mask plugin to target the number of requests per district.
I ...
0
votes
0
answers
48
views
QGIS - Print composer - Atlas - Show information depending on Atlas id
The classic way to display information depending on the ID of the Atlas is to create a rule based symbology on the different layers we want to control.
Like: "ID" = @atlas_pagename or: "...
3
votes
1
answer
58
views
QGIS Atlas print composer - Several raster in the same layout
I am trying to export an Atlas, with a comparison of maps between 3 periods.
For each period I have a different raster (2008, 2016, 2022).
I found a way to display the right raster, for each map, ...
1
vote
0
answers
61
views
Different resolution between QGIS Print Composer and output
I have created a regular route map in QGIS and now I am trying to export it as a PDF using the following settings:
Custom resolution:
Scale:
Size of the element:
Export resolution:
However, after ...
0
votes
0
answers
21
views
Generating a Layout output from a different workspace
I have developed a workspace that generates around 20 pages of maps and information. It uses the atlas function to control the Layout, so you can select the Site you are interested in, and it ...
2
votes
1
answer
91
views
Showing the name of certain visible layers in QGIS
I'm working with QGIS 3.22.11-Białowieża. In my project, I have four layers and I need to show in the print composer the name of those that are visible, but only among the first three (I don't want to ...
3
votes
1
answer
48
views
QGIS Print Layout Lagging when using SVG's
I am using QGIS version 3.22.4-Białowieża and when I use various SVGs in the print layout to create a diagram (image below) they lag/are jerky when I move an SVG object around. I have the NVIDIA ...
1
vote
1
answer
37
views
Exaggerate the overview area in the map composer
I work with QGIS 3.28.
As part of an atlas, I have a main map object map 1 and a small map object map 2 (small scale) for location.
The layer used for the atlas iteration is a polygon layer. The ...
2
votes
2
answers
68
views
Remove QgsLayoutItemPicture based on atlas if the path does not exist with PyQGIS
Based on this question and answer (that works perfectly) I was wondering if I can remove the QgsLayoutItemPicture from the atlas pages where the picture path does not exist using PyQGIS.
One ...
4
votes
1
answer
85
views
Changing the shape of the overview marker in QGIS print composer
I was wondering if it is possible to change the marker in an overview while working on an atlas in print composer of QGIS.
Could I change the shape of the marker to the actual form of the polygons in ...
1
vote
1
answer
38
views
QGIS 3.16 print composer - possible to manually adjust placement of items in legend?
I am having an issue with legend formatting in QGIS 3.16 print composer. I have 3 columns in the legend, and a limited amount of vertical space in the layout in which to fit the legend. All of the ...