40mm sounds like a lot to me, never had to lengthen one that much. I use 20 or 25mm clear or bronze acrylic for lengthening a wooden stock, much easier to make a nice unobtrusive job than trying to match a new piece of timber to an original stock. I cut it slightly over size, fit it to the rifle, tape the butt with masking tape, several layers,and then grind to fit using an old shearing grinder. I have the grinder low and a white sheet on the floor so I can look down and see that I'm following the line of the stock. Then you have to fit a bigger butt pad and repeat the exercise. After its all nice and fits well, I use fine sandpaper, or wet and dry to finish it off. If you want to make it even nicer, polish off the acrylic with "brasso" or some similar cutlery type polish and it polishes to clear so you can see right through it.
The procedure for a synthetic stock is similar, theres a heap of different "plastic" type stuff available from suppliers and you can get black to match the stock. You will need to anchor a 40mm extension firmly to your plastic stock, and that will need a bit of work. Then you fit a larger butt pad to the new piece.
Bookmarks