create Document using an inputstream