I want to convert .txt files to .pdf. I'm using this:
ls | while read ONELINE; do convert -density 400 "$ONELINE" "$(echo "$ONELINE" | sed 's/.txt/.pdf/g')"; done
But this produces one "error" -- if there's a very long line in the text file, it doesn't get wrapped.
Input text

Output PDF

--
Also, it would also be great if the output PDF could contain text, instead of images of text.
I have many-many-many TXT files. So don't want to do it by hand. I need an automatic solution, like the one I mentioned above.
for ONELINE in *instead ofls | while read ONELINE. Read this. – Jun 08 '13 at 19:48