Bug reports Found a bug? Post it here please.
Version 4.x > Bug reports > PDF files not appearing in Firefox View modes: 
User avatar
Member
Member
bartek.suchan-u2i - 12/29/2009 7:28:52 AM
   
PDF files not appearing in Firefox
We are having a problem similar to the one experienced by the posters at http://devnet.kentico.com/Forums/f17/fp8/t5567/Link-to-files-in-a-document-type.aspx. It appears to only happen when using the Firefox browser. You can see the issue by using Firefox to go to http://backupbabiesphp-dev1.krk.u2i.com/test.html and click the link (username/password max/max). The popup that appears should show a PDF, but instead it will be blank. The network monitor of Firefox's Firebug tool shows that the PDF is loaded (twice, in fact), but it doesn't appear. (It does work in other browsers). Clicking the link a second time sometimes works. Is there something we should be doing differently?

Thanks very much.

User avatar
Kentico Support
Kentico Support
kentico_radekm - 12/29/2009 11:34:49 AM
   
RE:PDF files not appearing in Firefox
Hello.

When I open link on this url: http://backupbabiesphp-dev1.krk.u2i.com/test.html in my Firefox 3.0.16, the pdf file is opened with no problem. I am using Adobe Reader 8.0. If the Firebug also shows that the PDF file is loaded, then I suppose the problem can be in your pdf reader, or its integration with Firefox. Could you please try to use the latest version of pdf adobe acrobat reader and also the latest plug-in for FireFox? Thank you.

Best Regards,
Radek Macalik
Support Engineer

User avatar
Member
Member
rkrause-eeye - 12/30/2009 6:10:58 PM
   
RE:PDF files not appearing in Firefox
Hello! I'm experiencing this same issue (and have been) for quite a while now. If you try to open any of the PDF files listed on our site (say, at this link for instance http://www.eeye.com/Resources/Literature/Success-Stories.aspx ), a blank window appears when you use Firefox. Internet Explorer works fine.

I contacted Kentico support about this issue and they worked to find out what was happening, however they were unable to reproduce the problem on their end.

I learned that the issue lies in either the latest Firefox release (3.5.6+ I believe), the latest Adobe Acrobat PDF Reader Firefox plugin release (9.1.0.163+), or perhaps the combination of the two. This does not appear to be a Kentico issue.

You can actually see that the PDF was loaded by trying this little trick. When your popup window opens that is supposed to display the PDF file, try resizing your browser just a bit. Voila! Seems to work for me. I did some heavy research on this issue back when I was first noticing it but turned up very little. The upshot seems to be that the latest plugin that Adobe released isn't correctly redrawing the screen after the PDF file loaded within Chrome and Firefox. Resizing the browser window forces a redraw to happen, and thus, allows you to see the PDF.

Unfortunately, I haven't come up with a solution to fix this.

I hope that at least helps point you in the right direction. If you figure out a workaround, let us know!

Thanks,

Ryan

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 12/31/2009 2:29:22 AM
   
RE:PDF files not appearing in Firefox
H Ryani,

Thank you for your detailed explanation on this issue. I’m glad that this is not Kentico CMS based issue and also Kentico CMS cannot do anything in order to solve this issue since this is Firefox based issue. If someone finds solution to this issue, please let us know. I also hope that Firefox together with Adobe will fix this issue.

Best regards,
Miroslav Remias.

User avatar
Member
Member
ken-inorbital - 1/15/2010 2:50:53 PM
   
RE:PDF files not appearing in Firefox
I definitely think that FireFox 3.5 + Acrobat Plugin 9.1 is causing the problem because I see the exact problem on machines with that set up and other machine works fine.

Here's a temporary fix:

Open up CMSPages/GetFile.aspx.cs and/or CMSPages/GetMediaFile.aspx.cs

Look for the following code

// Setup the mime type - Fix the special types
string mimetype = file.MimeType;
switch (file.Attachment.AttachmentExtension.ToLower())
{
case ".flv":
mimetype = "video/x-flv";
break;
}


Modify it to


// Setup the mime type - Fix the special types
string mimetype = file.MimeType;
switch (file.Attachment.AttachmentExtension.ToLower())
{
case ".flv":
mimetype = "video/x-flv";
break;
case ".pdf":
mimetype = "Application/X-unknown";
break;
}


What it does is that it checks to see if the file has the .pdf extension. If yes, force the server to return "Application/X-unknown" as the mimetype instead of the pdf mime type.

FireFox will react to this by asking if you want to save the file or open it with an application of your choice. In this case you can choose to open with Acrobat.

User avatar
Member
Member
rkrause-eeye - 1/15/2010 3:38:51 PM
   
RE:PDF files not appearing in Firefox
Not a bad trick! I really want to agree and say that it's an issue with the latest Firefox/Adobe plugin, but I'm still having a tough time wrapping my head around that because of the fact that I can go to most other sites and interact with PDF files without a problem.

For instance, I can go to this website:
http://www.qualys.com/resources/guides/

and I do not have an issue accessing any of their PDF whitepapers.

Could this be an issue with how Kentico delivers the PDF file to the browser when this particular Firefox/Adobe plugin is present? Maybe due to the fact that I'm not actually linking to the direct PDF file, but rather an ASPX page representation of that file, which then delivers the PDF through the getattachement method?

User avatar
Member
Member
andy-procaresoftware - 1/18/2010 11:57:23 AM
   
RE:PDF files not appearing in Firefox
I'm encountering this same issue in Firefox and Chrome.

User avatar
Member
Member
andy-procaresoftware - 1/18/2010 12:39:40 PM
   
RE:PDF files not appearing in Firefox
Agreed, this seems fishy that Firefox responds to a direct link to the PDF, but the failure happens when linking to the Portal .ASPX page links.

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 1/20/2010 9:28:04 AM
   
RE:PDF files not appearing in Firefox
Hello,

you may use the custom file extension and link the PDF document directly with PDF extension.

How to configure custom document extension:
Follow the instructions to configure the IIS: http://devnet.kentico.com/docs/devguide/configuration_of_extensionless_urls.htm
and then go to CMSDesk -> Content -> edit document -> Properties -> URLs -> Use custom URL extensions: true and add the extension

I hope it could help.


Best regards,
Helena Grulichova

User avatar
Member
Member
brandon - 4/7/2010 2:57:55 PM
   
RE:PDF files not appearing in Firefox
Has anyone found a resolution to this issue yet? We tried the workaround that ken-inorbital suggested, which worked fine for 4.1. However, we had to back that change out once we upgraded to 5.0 because it was causing issues in IE 7 and 8.

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 4/9/2010 1:37:59 AM
   
RE:PDF files not appearing in Firefox
Hello,

This might be also related to issue in version 5.0 with resumable download feature, which causes browser freeze in combination with special PDFs. Please take a look at following FAQ and try to apply suggested hotfix and add key to your web.config:

http://devnet.kentico.com/FAQs/Content-Management/Why-the-PDF-files-are-not-working-on-5-0-site-.aspx

Best regards
Ondrej Vasil

User avatar
Member
Member
arronwall1-gmail - 12/23/2013 10:15:49 PM
   
RE:PDF files not appearing in Firefox
Hi, I wonder whether it can be accomplished by building some web PDF viewers in to the firefox browser? I am learning about how to build pdf viewer with the help of some manual tools which can be customized by users according to our own favors to help view and read pdf files these days. I am considering to employ one whose way of processing is simple and fast to help me with the related work. It will be better if it is totally manual and can be customized by users according to our own favors. Do you have any ideas about it? Or any good suggestion?



Best regards,
Arron