#compdef pdf2dsc pdf2ps pdfimages pdfinfo pdftopbm pdftops pdftotext xpdf pdfopt pdffonts kpdf

local expl ext=''

# ghostscript:
#  pdf2dsc pdf2ps pdfopt
# xpdf:
#  pdfimages pdfinfo pdftopbm pdftops pdftotext xpdf pdffonts

if [[ "$1" == '-z' ]]; then
  ext='(|.gz|.Z)'
  shift
fi

_description files expl 'PDF file'
_files "$@" "$expl[@]" -g "*.(#i)pdf$ext(-.)"
