From Vim's command mode, if I enter this line I get just the text of the pdf, cleaned by pandoc, in a new un-named buffer
:read !pdf2txt <filename> | pandoc -t markdown
Trying to translate this to a line in .vimrc, instead I get a text version of the pdf's headers and metadata, with my new text appended into it.
au *.pdf read !pdf2txt % | pandoc -t markdown