<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body dir="auto"><div dir="auto">Hi Stewart</div><div dir="auto">I assume you are using a rater as a background layer and therefore you will always end up with a rectangle as your final extent.  If you clip to an irregular polygon, you will still have a rectangle but the outer area that had been clipped out will be transparent.  This is how raters work as they are regular grids.  The disadvantage of clipping to an irregular polygon is that you will create an additional alpha channel which defines the transparency but adds to the file size.</div><div dir="auto"><br></div><div dir="auto">I would consider making a number of smaller maps with some overlap to use with avenza.</div><div dir="auto"><br></div><div dir="auto">Kirk Schmidt</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div id="composer_signature" dir="auto"><div style="font-size:85%;color:#575757" dir="auto">Sent from my Galaxy</div></div><div dir="auto"><br></div><div><br></div><div align="left" dir="auto" style="font-size:100%;color:#000000"><div>-------- Original message --------</div><div>From: Stewart Holt <stewartbholt@gmail.com> </div><div>Date: 2021-07-30  4:38 p.m.  (GMT-04:00) </div><div>To: User List QGIS <qgis-user@lists.osgeo.org> </div><div>Subject: [Qgis-user] Clipping WMS Layer for Export to Geo PDF </div><div><br></div></div><div dir="ltr">I am working on a GeoPDF map to use in the Avenza map app. It is an 80 mile hiking trail which stair steps from SW to NE. I am using a WMTS layer as a background. I want to avoid having the PDF as large as a rectangle containing this trail. I created a polygon and used it to select the extent for the map, but it did not clip the map but instead it created a rectangular extent containing the polygon.<div><br></div><div>Next I created a larger rectangular polygon covering the area and cut out a ring for the trail and included this layer in the map. The result was the inclusion of all of the WMTS  map layer as before with my mask layer able to block unwanted areas. This does not reduce file size, ofcourse.</div><div><br></div><div>I think what that did is the correct behavior. What I need is a way to clip the WMTS layer on the fly. I think having the export to PDF being able to do this would be the best approach.</div><div><br></div><div>Can anyone think of how to accomplish this without exporting the WMTS layer and then clipping it with a polygon?</div><div><br></div><div>Thanks,</div><div><br></div><div>Stewart</div></div>
</body></html>