727/904 Dimensions

Was wondering if the 727 and 904 transmissions are the same length. The reason I ask is because I was planning on swapping a 727 in place of a 904 and wanted to know if I would need a different length driveshaft. Thanks.