Outlook Web App fails to preview PDF attachments in Exchange 2019 because the default attachment handler redirects users to download files rather than displaying them inline. To fix this, administrators must enable the "Attachment Preview" feature within the OWA Virtual Directory settings using PowerShell or the Exchange Admin Center.
Understanding the Default Behavior
By design, older versions of Outlook Web App (OWA) and certain configurations of Exchange 2019 do not render PDF files directly in the browser window. Instead, when a user clicks on a PDF attachment, the system triggers an immediate download to their local machine. This behavior is often intentional for security reasons, as it prevents potentially malicious scripts embedded in PDFs from executing within the browser sandbox.
However, many organizations require inline viewing for productivity. Users expect to quickly scan documents without leaving their inbox. When this expectation is not met, support tickets increase, and workflow efficiency drops. The issue is rarely related to the client-side browser capabilities, as modern browsers like Chrome, Edge, and Firefox all support native PDF rendering. The bottleneck lies entirely within the Exchange server configuration.
Distinguishing Browser Issues from Server Settings
Before modifying server settings, ensure that the problem is not isolated to a specific user's browser cache or plugin conflict. Clearing the browser cache and disabling third-party PDF plugins can sometimes resolve temporary glitches. If other users experience the same issue across different devices and browsers, the root cause is definitely the Exchange configuration.
Enabling Attachment Preview via PowerShell
The most reliable method to restore PDF preview functionality in Exchange 2019 is through the Exchange Management Shell. Administrators need to modify the OwaVirtualDirectory object associated with the specific virtual directory used by their web clients. The key parameter here is AttachmentPreviewEnabled.
To check the current status, run the following command:
Get-OwaVirtualDirectory | Format-List Name, AttachmentPreviewEnabled
If the output shows $False, you must enable it. Use the Set-OwaVirtualDirectory cmdlet to update the setting. Replace "OwaVirtualDirectory" with your actual virtual directory name if it differs from the default:
Set-OwaVirtualDirectory -Identity "owa (Default Web Site)" -AttachmentPreviewEnabled $true
This command forces the server to send the appropriate HTTP headers and JavaScript handlers that allow the OWA interface to load the PDF viewer component. After running this command, the change takes effect immediately for new sessions. Existing open tabs may need to be refreshed.
Configuring via Exchange Admin Center
If you prefer a graphical interface, you can achieve the same result through the Exchange Admin Center (EAC). Navigate to Servers and select Virtual Directories. Select the OWA virtual directory from the list and click the edit icon.
In the properties pane, look for the Client Experience tab. Under the section labeled Attachment handling, check the box for Allow attachment preview. Save your changes. This UI path is equivalent to the PowerShell command mentioned above but provides visual confirmation of the setting.
Verifying the Fix
After applying the changes, perform a test by sending a PDF attachment to a test mailbox. Log in to OWA and attempt to view the attachment. You should now see the document rendered in the main content area of the email, with navigation controls for pages. If the file still downloads, clear the OWA cookies for the domain and try again.
It is important to note that while PDFs are the primary concern, this setting also affects other MIME types supported by the browser, such as images and plain text files. Ensure that your organization's security policy allows for this level of inline rendering. For complex documents, users might still prefer downloading the file for full editing capabilities.
Related Resources
If you are dealing with PDF generation issues alongside viewing problems, you may find our guide on converting Word documents helpful. See Possible Ways to Convert Word to PDF without Quality Loss for best practices in document creation.
Additionally, if you need to manage data formats that might be attached alongside these PDFs, checking out Changing Font of a Hypertext PDF Without Messing Up the Hyperlinks can improve the overall quality of shared documents.
Frequently Asked Questions
Does enabling attachment preview affect security?
Yes, it slightly increases the attack surface by allowing scripts within PDFs to interact with the browser environment more closely. However, modern browsers isolate these interactions effectively. Organizations should rely on updated antivirus software and network-level filtering to mitigate risks.
Why do some PDFs still not preview after enabling the setting?
This usually happens if the PDF file is corrupted or uses encryption that the OWA viewer cannot handle. Additionally, extremely large PDF files may fail to load due to timeout restrictions configured in the IIS settings for the OWA virtual directory.
Can I disable preview for specific file types only?
No, the AttachmentPreviewEnabled setting is a global toggle for the virtual directory. It applies to all supported MIME types simultaneously. You cannot whitelist or blacklist specific extensions like PDF or DOCX through this single parameter.
What happens if I revert the setting to False?
All users will immediately return to the download-only behavior for attachments. Any pending previews in open browser tabs will likely break or prompt a download instead. No data is lost, but user experience changes abruptly.
Is this issue present in Exchange Online as well?
Exchange Online (Office 365) handles attachment previews differently, often relying on Microsoft Stream and Office Online integration. The specific Set-OwaVirtualDirectory cmdlet is exclusive to on-premises Exchange servers like 2019 and 2016.