locked
Unable to open 5mb PDF file RRS feed

  • Question

  • Hi!

    We are having some issues when attempting to open a PDF file larger than approx. 5 mb. All PDF files 5 mb or less opens without problems. We have set the "Browser file handling" to "Permissive".

    We are able to open other file formats larger than 5 mb (i.e Powerpoints, word/excel docs)

    Sharepoint 2010 SP1 installed. SQL server is running SQL 2008 Standard R2.
    Thursday, September 22, 2011 7:01 AM

Answers

  • As it turns out this issue was caused by a third party solution (Muhimbi PDF converter). We might have had a corrupt install.

    After retracting this solution we are now able to open all pdf files independent of file size directly in the browser.

    Thanks for all the suggestions guys.

    • Proposed as answer by KSDN Thursday, September 29, 2011 9:24 AM
    • Marked as answer by Christian Egeland Thursday, September 29, 2011 9:48 AM
    Thursday, September 29, 2011 8:03 AM

All replies

  • Just noticed I get an error in the SP2010 crawl log for the same pdf files that I cannot open: "Exception from HRESULT: 0x80072EE2". We are using Adobe iFilter for pdf crawl.
    Thursday, September 22, 2011 9:49 AM
  • Could this be a SQL issue? Or maybe a browser handling issue?

    I find it hard to believe that SQL is causing this since a normal file download works (send to - download a copy and then select open).
    Thursday, September 22, 2011 12:51 PM
  • Hello Christian,

    The General Settings option on the General Settings drop-down menu lets you view and modify the following settings for a Web application

    Browser File Handling

    You can specify whether additional security headers are added to documents that are served to Web browsers. These security headers specify that a browser shows a download prompt for certain types of files (for example, .html), and to use the server's specified Multipurpose Internet Mail Extensions (MIME) type for other types of files.

    The Permissive setting specifies that no headers are added. The Strict setting adds headers that force the browser to download certain types of files. The forced download improves security for the server by disallowing the automatic execution of Web content. By default, the setting is Strict

    Run the below command and check the status of the document library if it is set to strict or permissive

    $w= get-spweb http://url of document library
    $w.Lists | select BrowserFileHandling,Title

    Run the commands mentioned below

    #Get Document Library
    $docLib = $w.lists["Shared Documents"]

    #View all properties/methods of the Document Library and you'll see that BrowserFileHandling is a property
    $docLib | Get-Member

    #See the current BrowserFileHandling setting for the Document Library
    $docLib.BrowserFileHandling

    #If you need to change it from Strict to Permissive
    $docLib.BrowserFileHandling = "Permissive"
    $docLib.Update()

    Thanks,

    Raj

    Thursday, September 22, 2011 1:37 PM
  • Thanks for your suggestion Raj,

    I've checked the BrowserFileHandling and it returns Permissive (which is also set in the Central Admin - Manage Web Applications - General Settings).

    When I open 3 mb pdf files or smaller they are opened directly in the browser, but when I try a 4-5 mb file or larger i get a timeout. If I instead of just clicking the file choose "Send to - download a copy" from the dropdown menu I am able to download and open the file just fine.

    For some reason we are simply unable to open pdf files larger than 4-5 mb. As mentioned above a 20mb powerpoint opens without problems and we also get crawl errors in the Search Service Service application on the same pdf files that we are unable to open

    Friday, September 23, 2011 6:25 AM
  • Hello Christian,

    Try installing this http://support.microsoft.com/kb/2459108 though it talks about HTML files

    Consider the following scenario:

    • You set Browser File Handling to Permissive for a web application in the General settings page in SharePoint 2010 Central Administration.
    • You create a document library, and then upload an html document.
    • You open the html document in the browser.

      Note You are not prompted to download the html document and it is rendered in the browser.
    • You select to include the content when you save the SharePoint site as a template.
    • You use the template to create a new SharePoint site in the same web application.
    Friday, September 23, 2011 6:52 PM
  • Similar symptoms, but for HTML instead of PDF files.

    Tried to run the hotfix anyway, but it says it's already installed.

    Monday, September 26, 2011 10:06 AM
  • Hi!

    We are having some issues when attempting to open a PDF file larger than approx. 5 mb. All PDF files 5 mb or less opens without problems. We have set the "Browser file handling" to "Permissive".
    Can you eloborate "some issues".  Is there any error shown on screen or does it hang?
    Thanks & Regards,
    Kamlesh | Blog | Twitter | Posting is provided "AS IS" with no warranties, and confers no rights.
    Monday, September 26, 2011 11:10 AM
  • Hi!

    We are having some issues when attempting to open a PDF file larger than approx. 5 mb. All PDF files 5 mb or less opens without problems. We have set the "Browser file handling" to "Permissive".
    Can you eloborate "some issues".  Is there any error shown on screen or does it hang?
    Thanks & Regards,
    Kamlesh | Blog | Twitter | Posting is provided "AS IS" with no warranties, and confers no rights.


    In the browser we just get a timeout, no error message. Regardless of the browser used.
    This is when trying to render the PDF in the browser, but downloading the file and then opening it works just fine - as explained in my 4th post.

    Server logs do not show any errors on this, except Search Service application errors when trying to crawl these files.

    Monday, September 26, 2011 11:43 AM
  • And is this behavior happening from all the Client Computers? 

    Whats the behavior of this on other browsers like Firefox, Chrome?


    Thanks & Regards,
    Kamlesh | Blog | Twitter | Posting is provided "AS IS" with no warranties, and confers no rights.
    Monday, September 26, 2011 5:18 PM
  • Yes, we have tried opening the files from multiple client computers and from the SP server itself - all of the browsers time out (Safari, Chrome, Firefox, IE), providing no error.

    When opening a 3 mb file it only takes a second or two and then the pdf is displayed in the browser (works in all browsers). So I guess it's something on the server side.

    We have installed all the windows updates and are running SP2010 SP1.

    - IIS version: 7.5.7600.16385

    - SQL 2008 R2 Standard

    - Windows Server 2008 R2 Standard SP1
    Tuesday, September 27, 2011 7:05 AM
  • Is there any specific pattern that these PDF files follow?  Are these some kind of Online PDF Forms? What tool have you used to author these PDF files? Is it possible for your to share a sample PDF from your server, which we can try?

    Did you try uploading a simple 5mb PDF and tried to load it for viewing?


    Thanks & Regards,
    Kamlesh | Blog | Twitter | Posting is provided "AS IS" with no warranties, and confers no rights.
    Tuesday, September 27, 2011 7:48 AM
  • Thanks for your suggestion,

    However, the only pattern I've found is the fact that they are all larger than approx 4mb. I've tried PDF's generated from our scanner, Word, InDesign etc, and there seems to be no difference.

    I've also tried to upload the same 4,5 mb pdf file to a different site collection/web app and it fails to open as described above on all the web apps/site collections.

    I also created a 5 mb jpeg and uploaded to the same web apps/ site collections - no problem opening that file in the browser.

    Tuesday, September 27, 2011 8:03 AM
  • Hello Christian Egeland,

    Are the PDF files password protected?

    Tuesday, September 27, 2011 1:53 PM
  • Hi,

    The PDF files are not password protected

    Tuesday, September 27, 2011 8:10 PM
  • As it turns out this issue was caused by a third party solution (Muhimbi PDF converter). We might have had a corrupt install.

    After retracting this solution we are now able to open all pdf files independent of file size directly in the browser.

    Thanks for all the suggestions guys.

    • Proposed as answer by KSDN Thursday, September 29, 2011 9:24 AM
    • Marked as answer by Christian Egeland Thursday, September 29, 2011 9:48 AM
    Thursday, September 29, 2011 8:03 AM
  • HI! I know it's been a while, but I'm curious if you got it to work with Muhimbi PDF converter installed. I'm having the same problem, but we need the PDF conversion functionality so simply retracting the solution isn't an option for me.
    Tuesday, August 12, 2014 5:40 PM
  • Hi,

    Sorry but we closed the project quite some time ago.

    I can't remember but I think we ended up with a farm redeployment :(.

    Monday, August 18, 2014 5:34 PM

  • Imports System.IO
        Declare Function ShellExecuteA Lib "shell32.dll" ( _
         ByVal hWnd As IntPtr, _
         ByVal lpOperation As String, _
         ByVal lpFile As String, _
         ByVal lpParameters As String, _
         ByVal lpDirectory As String, _
         ByVal nShowCmd As Integer) As IntPtr

    Private Sub Button13_Click(sender As System.Object, e As System.EventArgs) Handles Button13.Click
     Dim DocName As String

            DocName = TextBox2.Text + ".pdf"
            ShellExecuteA(vbNull, "Open", DocName, vbNull, "E:\pictures", SW_SHOWNORMAL)
    End Sub

    Tuesday, December 22, 2015 6:37 AM