document generation+download works