File type mis-recognition: reads pdf/doc files as html to produce gibberish
-
Here’s a puzzle which has stumped me for a long time: maybe you can crack it.
We have three websites: one Joomla and two WordPress.
We can upload jpg files to all three sites and they display correctly.
We can upload pdfs to all three sites. The directory name of each file correctly refers to the file as “filepath/filename.pdf”
Visiting the joomla site, clicking on the link opens Adobe reader.
Visiting either WordPress site, clicking on the link however, gives an entire page of gibberish such as this:
????JFIF????XICC_PROFILEHLinomntrRGB XYZ ? 1acspMSFTIEC sRGB???-HP cprtP3desc?lwtpt?bkptrXYZgXYZ,bXYZ@dmndTpdmdd??vuedL?view?$lumi?meas$tech0rTRC<gTRC<bTRC<textCopyright (c) 1998 Hewlett-Packard CompanydescsRGB IEC61966-2.1sRGB IEC61966-2.1XYZ ?Q?XYZ XYZ o?8??XYZ b????XYZ $????descIEC https://www.iec.chIEC https://www.iec.chdesc.IEC 61966-2.1 Default RGB colour space
My intuition is WordPress tries to read the pdf file as an html file.
It’s not an issue of corrupt pdf files: we’ve used internally-generated pdf files, but also used pdfs from e.g., US government websites to assure the problem is not in our pdf files.
I also tried uploading a MS-Word media file, and get the same result: the browser does not open Word, the browser tries to “read” the file and provides a page of gibberish.
It’s not a server issue: all three sites have the same host.
It’s likely not an operating system issue: it happens with Win-XP, and Windows 7, my ipad …
It’s (likely) not a template-specific issue, as our WordPress sites use two different WordPress templates.
It’s likely not a WordPress version issue: this has been going on for perhaps a year or two.
Any way to teach WordPress to open Adobe when encountering a pdf file?
- The topic ‘File type mis-recognition: reads pdf/doc files as html to produce gibberish’ is closed to new replies.