doc2sequence is actually the tool to use to run word2vec on a document, plus padding the output to a common length if desired – the latter is important for some deep learning applications. Check the second example in the doc2sequence documentation.
To get a single dim-by-length array, you will need to take the result and get the first (and only, for a single document input) cell:
c = doc2sequence(emb, document);
c{1}