I have a bunch of lines that go behind the layer of a mountain that I have created and I would like to cut them out. Proving to be impossible right now with the pathfinder tool. Any suggestions?
Assuming the yellow needs to be removed from the mountain.
Select the yellow and choose
Object > Expand from the menu. This converts the strokes to shapes. Pathfinder doesn't work well with strokes, it needs shapes.
Once the strokes are expanded you should be able to use Pathfinder to subtract the yellow shapes from the mountain (or anything else).
Creating a layer mask over the yellow lines would also achieve the same effect, and would be non-destructive as well. Just another option.
I have some kind of a workaround. Requires some manual labour. (Of course - non destructive options are preferred, but sometimes we need to cut e.g. when we need round caps on the strokes)
First, make sure that there are only 2 shapes to cut eachother. If the parts consist of more that one element, this can be done by making a Compound path of everything that belongs together.
I use the Pathfinder/Divide , which leaves all paths intact, but adds anchor points at the crossings of paths. Then hand pick the strokes you need (with the direct selection tool), invert selection and backspace.