Sure! Here's what I use for docx, and I think it could be adapted to pdf with pdftotext or whatever you're already using there. You need a small shell script that reads from STDIN, writes to a file, and calls pandoc or pdftotext or whatever, like ~/bin/antiwordx: #!/bin/sh tmpfile=$(mktemp /tmp/antiwordx.XXXXXX.docx) trap 'rm -f -- "$tmpfile"' INT TERM HUP EXIT cat > "$tmpfile" pandoc --normalize -r docx -w markdown "$tmpfile" You need a small handler function to call it from Elisp---see attached file `inline-docx.el`, which assumed you have both the old `antiword` for old-style .doc files and pandoc for new-style `docx`. I apologize for the roughness of the code; it should probably use customizable paths for pandoc and such. -Brian