PDFtotext don´t work if path has space

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

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

Forgive me for my english.  :o)

Jeferson DornellesAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NVITEnd-user supportCommented:
Wrap path in quotes, like:
 pdftotext -simple "c:\temp\mzk\rais - 2018\prot.pdf" c:\temp\mzk\temp.txt

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Joe Winograd, Fellow&MVEDeveloperCommented:
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.
Joe Winograd, Fellow&MVEDeveloperCommented:
The answer is to use quotes, as stated in both posts.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.