Why PDF Preview Fails in a Document Library
🔍 WiseChecker

Why PDF Preview Fails in a Document Library

When you open a PDF in a SharePoint document library and see a blank page, a download prompt, or an error message instead of the file content, the preview feature is not working. This problem usually occurs because of browser settings, missing PDF viewer add-ons, or SharePoint configuration that blocks the preview service. This article explains the root causes of PDF preview failures and provides step-by-step fixes to restore the preview functionality.

Key Takeaways: Fix PDF Preview in SharePoint Document Library

  • SharePoint admin center > Settings > PDF preview: Enables or disables the built-in PDF viewer for all sites.
  • Browser PDF viewer setting: Chrome and Edge have a flag that forces PDF download instead of preview.
  • Library settings > Advanced settings > Opening documents in the browser: Controls whether PDFs open in the browser or download.

ADVERTISEMENT

Why PDF Preview Fails in a Document Library

SharePoint uses the Microsoft 365 PDF preview service to render PDF files directly in the browser. When this service fails, SharePoint falls back to the browser’s built-in PDF viewer or prompts a download. The root cause is usually one of three things:

Browser PDF Viewer Disabled

Modern browsers like Google Chrome and Microsoft Edge have a built-in PDF viewer. If this viewer is turned off, the browser cannot display the PDF inline. Instead, it downloads the file. The setting is controlled by a browser flag called “Download PDF files instead of automatically opening them in Chrome” or the equivalent in Edge.

SharePoint PDF Preview Feature Disabled

SharePoint tenant administrators can disable the PDF preview service at the tenant level. When this feature is off, SharePoint never sends PDF content to the preview service. Users see a download button or a blank preview pane.

Library Configuration Forces Download

Each document library has an advanced setting called “Opening documents in the browser.” If this is set to “Open in the client application,” SharePoint forces all files to download instead of opening in the browser. This overrides the PDF preview service.

Steps to Restore PDF Preview in a Document Library

  1. Check the browser PDF viewer setting in Chrome or Edge
    Open Chrome or Edge. In the address bar, type chrome://settings/content/pdfDocuments (Chrome) or edge://settings/content/pdfDocuments (Edge). Ensure the toggle for “Download PDF files instead of automatically opening them in Chrome” (or Edge) is turned off. If it is on, turn it off and reload the SharePoint library.
  2. Enable the PDF preview service in the SharePoint admin center
    Go to the SharePoint admin center. Select Settings from the left navigation. Under the PDF preview section, make sure the toggle is set to On. If it is off, turn it on and click Save. Wait up to 15 minutes for the change to propagate.
  3. Adjust library advanced settings
    Navigate to the document library where PDF preview fails. Click the gear icon and select Library settings. Under General settings, click Advanced settings. In the Opening documents in the browser section, select Open in the browser. Click OK.
  4. Clear browser cache and cookies
    Press Ctrl + Shift + Delete to open the clear browsing data dialog. Select All time as the time range. Check Cookies and other site data and Cached images and files. Click Clear data. Reload the SharePoint site.
  5. Test with a different PDF file
    Upload a new, small PDF file (less than 10 MB) to the library. Click the file to see if the preview loads. If the new file previews correctly, the original PDF may be corrupted or have unsupported features like embedded 3D content.

ADVERTISEMENT

If PDF Preview Still Fails After the Main Fix

PDF Preview Shows a Blank Page

A blank page usually means the PDF is too large or contains complex elements. SharePoint has a file size limit of 250 MB for preview. If the PDF is larger, it will not preview. Also, PDFs with scanned images, forms, or embedded fonts may fail. Try converting the PDF to a simpler format using Adobe Acrobat or an online tool and re-upload.

PDF Preview Shows an Error Message

Error messages like “This file can’t be previewed” or “Something went wrong” often indicate a service outage. Check the Microsoft 365 service health dashboard. Go to the Microsoft 365 admin center > Health > Service health. Look for any incidents related to SharePoint or Office Online. If an incident exists, wait for Microsoft to resolve it.

PDF Preview Works on Some Sites but Not Others

If preview works on one SharePoint site but fails on another, the problem is likely a site collection feature or a custom script. Check if the site has a custom master page or JavaScript that blocks the preview iframe. Temporarily disable custom scripts in the site collection settings: Site settings > Site collection features > turn off Custom Script. Test the preview again.

PDF Preview Fails Only on Mobile or Tablet

Mobile browsers often have limited PDF support. On iOS, Safari uses Apple’s built-in PDF viewer. On Android, Chrome uses its own viewer. If preview fails on mobile, install the Microsoft 365 mobile app. Open the document library in the app and tap the PDF. The app uses the native PDF viewer of the device.

Item Browser PDF Viewer SharePoint PDF Preview Service
Description Built-in viewer in Chrome, Edge, Firefox, and Safari that renders PDFs inline Microsoft 365 cloud service that generates a preview of the PDF content
Control location chrome://settings/content/pdfDocuments or edge://settings/content/pdfDocuments SharePoint admin center > Settings > PDF preview
Effect when disabled Browser downloads the PDF instead of displaying it SharePoint shows a download button or blank preview pane
Affects all sites? Yes, all sites in the browser Yes, all sites in the tenant
Requires admin? No, user can change it Yes, SharePoint admin must enable it

You can now diagnose and fix PDF preview failures in a SharePoint document library. Start by checking the browser PDF viewer setting and the library advanced settings. If the issue persists, verify the SharePoint PDF preview service is enabled in the admin center. As an advanced tip, use the SharePoint Online Management Shell to check the PDF preview status for all sites at once with the Get-SPOTenant cmdlet and the DisablePDFPreview property.

ADVERTISEMENT