This is a discussion on pdf-mime-type within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi! I have the problem, that .pdf-files are downloaded and after that they get displayed. On other servers i ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
"Michael Volk" <micha_volk@t-online.de> schreef in bericht
news:cq3qej$t0j$00$1@news.t-online.com... > I have the problem, that .pdf-files are downloaded and after that they get > displayed. > On other servers i see, the .pdf is opend during the download. > Where can i set that feature? > mime-type is set to > application/x-pdf pdf That is only one of the standards :-( , just like these application/pdf application/acrobat applications/vnd.pdf text/pdf text/x-pdf On MS-Windows an application is associated with a file extention. Some applications, like IE, are able to associate a document by mime-type and if succesful display it inside their window. The mime type associated by IE with these Portable Document Format files is application/pdf -note the missing x-. For mime-typing of static files Apache uses two files: mime.type and magic. Check each contains only application/pdf ( if you find application/x-pdf, just change it to application/pdf -and restart apache- ). If the PDF file is generated by a script, this script may have set the mime type to 'application/x-pdf '. Check and change the source code accordingly .... HansH |
|
|||
|
Hi!
Thank you for that. I changed my mime.types and magic. Now the reader starts at beginning of the download but i get an error-message: File doesnt start with "%PDF-" Any idea? Thanks, Michael "HansH" <hans@niet.op.het.net> schrieb im Newsbeitrag news:cq45rv$m8q$1@news.cistron.nl... > "Michael Volk" <micha_volk@t-online.de> schreef in bericht > news:cq3qej$t0j$00$1@news.t-online.com... >> I have the problem, that .pdf-files are downloaded and after that they >> get >> displayed. >> On other servers i see, the .pdf is opend during the download. >> Where can i set that feature? >> mime-type is set to >> application/x-pdf pdf > That is only one of the standards :-( , > just like these > application/pdf > application/acrobat > applications/vnd.pdf > text/pdf > text/x-pdf > > On MS-Windows an application is associated with a file extention. Some > applications, like IE, are able to associate a document by mime-type and > if > succesful display it inside their window. The mime type associated by IE > with these Portable Document Format files is application/pdf -note the > missing x-. > > For mime-typing of static files Apache uses two files: mime.type and > magic. > Check each contains only application/pdf ( if you find application/x-pdf, > just change it to application/pdf -and restart apache- ). > > If the PDF file is generated by a script, this script may have set the > mime > type to 'application/x-pdf '. Check and change the source code accordingly > ... > > HansH > > > > > > > |
|
|||
|
"Michael Volk" <micha_volk@t-online.de> schreef in bericht news:cq5qvu$q1p$01$1@news.t-online.com... > "HansH" <hans@niet.op.het.net> schrieb im Newsbeitrag > news:cq45rv$m8q$1@news.cistron.nl... > > "Michael Volk" <micha_volk@t-online.de> schreef in bericht > > news:cq3qej$t0j$00$1@news.t-online.com... > >> I have the problem, that .pdf-files are downloaded and after that they > >> get displayed. > >> On other servers i see, the .pdf is opend during the download. > >> Where can i set that feature? > >> mime-type is set to > >> application/x-pdf pdf > > That is only one of the standards :-( , > > For mime-typing of static files Apache uses two files: mime.type and > > magic. > > Check each contains only application/pdf ( if you find application/x-pdf, > > just change it to application/pdf -and restart apache- ). > I changed my mime.types and magic. That's rather _un_expected ... what distribution are you using? > Now the reader starts at beginning of the download but i get an > error-message: File doesnt start with "%PDF-" > Any idea? Check your config files for more 'application/x-pdf' entries and change them one at a time too, otherwise add the line 'RemoveOutputFilter DEFLATE application/pdf'. This assumes data compression by mod_deflate ... http://httpd.apache.org/docs-2.0/mod/mod_deflate.html .... please include related directives in your next post. HansH |
|
|||
|
Hi!
Ok, there is only one application/pdf Now, where do i have to add this line? I tried in mime.types, but no success. Thanks, Michael "HansH" <hans@niet.op.het.net> schrieb im Newsbeitrag news:cq7i3u$hqd$1@news.cistron.nl... > > "Michael Volk" <micha_volk@t-online.de> schreef in bericht > news:cq5qvu$q1p$01$1@news.t-online.com... >> "HansH" <hans@niet.op.het.net> schrieb im Newsbeitrag >> news:cq45rv$m8q$1@news.cistron.nl... >> > "Michael Volk" <micha_volk@t-online.de> schreef in bericht >> > news:cq3qej$t0j$00$1@news.t-online.com... >> >> I have the problem, that .pdf-files are downloaded and after that they >> >> get displayed. >> >> On other servers i see, the .pdf is opend during the download. >> >> Where can i set that feature? >> >> mime-type is set to >> >> application/x-pdf pdf >> > That is only one of the standards :-( , >> > For mime-typing of static files Apache uses two files: mime.type and >> > magic. >> > Check each contains only application/pdf ( if you find > application/x-pdf, >> > just change it to application/pdf -and restart apache- ). >> I changed my mime.types and magic. > That's rather _un_expected ... what distribution are you using? > >> Now the reader starts at beginning of the download but i get an >> error-message: File doesnt start with "%PDF-" >> Any idea? > Check your config files for more 'application/x-pdf' entries and change > them > one at a time too, otherwise add the line 'RemoveOutputFilter DEFLATE > application/pdf'. > > This assumes data compression by mod_deflate ... > http://httpd.apache.org/docs-2.0/mod/mod_deflate.html > ... please include related directives in your next post. > > > HansH > > |
|
|||
|
"Michael Volk" <micha_volk@t-online.de> schreef in bericht
news:cq9h27$693$00$1@news.t-online.com... > "HansH" <hans@niet.op.het.net> schrieb im Newsbeitrag > news:cq7i3u$hqd$1@news.cistron.nl... > > "Michael Volk" <micha_volk@t-online.de> schreef in bericht > >> > For mime-typing of static files Apache uses two files: > >> > mime.type and magic. > >> > Check each contains only application/pdf > >> Now the reader starts at beginning of the download but i get an > >> error-message: File doesnt start with "%PDF-" > >> Any idea? > > Check your config files for more 'application/x-pdf' entries and change > > them one at a time too, otherwise add the line > > 'RemoveOutputFilter DEFLATE application/pdf'. > > > > This assumes data compression by mod_deflate ... > > http://httpd.apache.org/docs-2.0/mod/mod_deflate.html > > ... please include related directives in your next post. > Ok, there is only one application/pdf ONE? in which file?? (please quote the line) > Now, where do i have to add this line? Somewhere -not anywhere- in httpd.conf or apache.conf or any file included by either of these ... file names and file content may vary per distribution of Apache. Where did you download your Apache? HansH |