Catalysis of the reaction: (2E,6E)-farnesyl diphosphate + 5 isopentenyl diphosphate = 5 diphosphate + all-trans-octaprenyl diphosphate.