add '-d' option to download doc/pdf.