SID-02300: PDF's not displayed
| Status: |
Asked |
TWiki version: |
4.3.2 |
Perl version: |
v5.10.1 |
| Category: |
|
Server OS: |
RHEL 6 |
Last update: |
8 years ago |
Hello,
I have a support TWiki that has many PDF files for documentation and procedures. Any time we link directly to PDF files on our TWiki as:
https://site/twiki/bin/viewfile/department/document.pdf
the PDF will not load and instead we receive a pop-up message: Failed to load PDF document (Reload) and the document does not load. If I had the Adobe PDF viewer enabled I can download the PDF and it views find, but we cannot get the PDF to load in the browser (Chrome, Firefox, IE).
Has anyone had a similar issue or have any suggestions?
Thanks!
--
Vince Neal - 2017-02-20
Discussion and Answer
I don't have this issue, so this is a bit of guesswork. Your
viewfile link looks strange, like a mixture of TWiki's two mechanisms to view attachments - all I get from such a link is a 403 status code ("Not found"). It should look like either of the following:
For a link of the first style, check TWiki's configuration setting
{MimeTypesFileName} which per default points to
.../data/mime.types: This is the file which maps an attachment with extension
.pdf to the MIME type
application/pdf which all browsers should understand. It should contain a line like that:
application/pdf pdf
For the second style, check the web server's configuration: Usually it does a similar thing from a platform-dependent mapping of extensions to MIME types (I'd guess
/etc/mime.types for RHEL), with the same syntax.
--
Harald Jörg - 2017-03-03
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.