PDFtotext don´t work if path has space

Hello!
Can you help me? Pdftotext don´t work for me if the path of *.PDF have space in your name. Example:

don´t work:
pdftotext -simple c:\temp\mzk\rais - 2018\prot.pdf c:\temp\mzk\temp.txt

work:
pdftotext -simple c:\temp\mzk\rais-2018\prot.pdf c:\temp\mzk\temp.txt

Forgive me for my english.  :o)
Thank's!

Jeferson
Brazil
Jeferson DornellesAsked:
Who is Participating?
 
NVITConnect With a Mentor Commented:
Wrap path in quotes, like:
 pdftotext -simple "c:\temp\mzk\rais - 2018\prot.pdf" c:\temp\mzk\temp.txt
0
 
Joe Winograd, Fellow&MVEConnect With a Mentor DeveloperCommented:
Hi Jeferson,
First, I see that you joined Experts Exchange today, so let me say, Welcome Aboard!

Your issue is not specific to pdftotext — it is a general rule that file names on the command line that have spaces in them must be enclosed in quotes. For example:

pdftotext "c:\temp\input file with spaces.pdf" "c:\temp\output file with spaces.txt"

Open in new window

Btw, you may find my 5-minute EE video Micro Tutorial on pdftotext to be helpful:
Xpdf - Convert PDF Files to Plain Text Files

You may also find some of my other 5-minute EE video Micro Tutorials on the Xpdf utilities to be helpful:
Xpdf - Command Line Utility for PDF Files
Xpdf - Extract Images from PDF Files
Xpdf - PDFinfo - Command Line Utility to Retrieve Page Count and Other Information from PDF Files
Xpdf - PDFdetach - Command Line Utility to Detach Attachments from PDF Files
Xpdf - PDFtoPNG - Command Line Utility to Convert a Multi-page PDF File into Separate PNG Files
Xpdf - PDFfonts - Command Line Utility to List Fonts Used in a PDF File

Welcome to Experts Exchange! Regards, Joe

P.S. Your English is fine...I certainly had no problem understanding your question.
0
 
Joe Winograd, Fellow&MVEDeveloperCommented:
The answer is to use quotes, as stated in both posts.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.