get document info from file (api-ish call)