@theLBC provided some good dope on how to do it if cutting yourself.
Another thought is to lay it out backward (length wise). That is, generally you want the butt at the end where the wheels are. Lay it out the opposite and then after cutting just flip it length wise so now your butt is at the right end and any marker lines on the foam are now underneath.
A touted tool for cutting is a sharp electric knife but I have NOT done this myself so can't comment.
My understanding is that the hot foam cutters are more for Styrofoam than the kind of foam used in these cases.
If looking for professionally cut foam, the process differs just a bit from one to another. Generally, though, if you lay it out on graph paper and take overhead pics, this will work (works for Cobra at least). Some say that they don't need graph paper but only the length of the gun and I'm guessing they calculate scale from there. But rolls of graph paper are reasonably inexpensive and easy to come by.
A hit on a lot of the rolls of graph paper that I have come across in reviews is that the grid is not precise and over a given length there will be error. I plan to just put a tape measure in the pic with the rifle.
Also, I'm planning to put my binos in this case and will take pics of thickness (side view, if you will) of both the binos and the gun just to make sure that they know the depth.
Lay it out the way you want, take pic, order and send them the pics. If there are any issues/questions, they will contact you.