Question Locked

Batch PDF to MP3 Conversion

0 helpful
0 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have the following four commands, which executed in sequence, will convert one PDF to MP3.

pdftohtml FNX.pdf
textutil -convert txt FNX.html
say -f FNX.txt -r 220 -o FNX.aiff --progress
ffmpeg -i FNX.aiff FNX.mp3

I convert from PDF to HTML and from HTML to TXT
because my pdftotext doesn't work.

If I try looping the first line, above, as in
for f in *.pdf; do pdftohtml “$f”; done
it gives the message
Error: Couldn't open file '“??'

If I loop the second line,
for f in *.html; do textutil -convert txt “$f”; done
I get
Error reading â. The file doesn’t exist.

This is all after a lot of tinkering on the LinuxQuestions site,
cuz I forgot it's not the same as Mac.

So I'm pretty lost here.
Any help appreciated !!

0 replies

No replies were posted before this discussion closed.

This discussion is closed to new replies.