I have a vague recollection that I did this many years ago, but can't remember the details. But I would suggest that you don't cut it to what you think is the correct length and then fit it. I think you'll find that it might be better to fit it, and then trim it just before you reach the end while you still have a couple of inches or so to go. Otherwise, just a small amount of compression or tension as you fit it round the various turns and angles of the door aperture could mean it's ultimately too short.