Don't try to index non-text files when importing from document

Also call the callback when importing PDFs from the document. I'm not
sure why this wasn't called before, but it seems like it should be.