close window after document download

Signed-off-by: Blaise Fonseca <blaisefonseca@hotmail.com>