# doc-view failing for some PDFs, but ghostscript can view them?

When I use docview to view PDFs on my work computer (a redhat linux system) it always works, except in PDFs coming from Springer-Verlag articles and chapters. In that case it gives this error:

Invalid format operation %A


However, I can view such files using gs directly.

I have no such problem on my home iMac. The version of gs that I have at work is 9.07, and the version of emacs is 24.3.1. I checked customize and there are no nonstandard settings there for doc-view.

Why is docview failing to load this PDF, even though gs can do it? How do I fix the problem?

• Not sure about your question, but the pdf-tools package provides a much nicer alternative to doc-view for pdfs. It uses poppler rather than gs as a display engine, so might not suffer from the same issue. I haven't noticed any problems and I'm sure some of my pdfs are from Springer. – Tyler Jan 25 '17 at 18:44
• I think that I found the problem -- it's in the file name. All of the files from Springer have a '%' in them. When I rename them to a name without the '%' things work fine. There must be some sort of bug in doc-view elisp that was fixed in the version that I have on the iMac. – Victor Miller Jan 25 '17 at 20:58
• Do try Tyler's suggestion regardless of your workaround. Viewing PDFs in Emacs with pdf-tools is so much nicer than it is with doc-view. – phils Jan 25 '17 at 23:46
• pdf-tools might be nice, but since I'm not a sysadmin, I can't install it. – Victor Miller Jan 26 '17 at 15:27
• I see that this was reported as a bug in 24.3: lists.gnu.org/archive/html/bug-gnu-emacs/2014-11/msg00314.html – Victor Miller Jan 26 '17 at 17:55