Wictor Wilen has written a great blog post about enabling PDF previews in SharePoint 2013 document libraries with Office Web Apps 2013 which can be found here:
Wictor provides the WSP to provide PDF preview functionality and this works great, but some customers are running into issues when attempting to click "Open" on PDF previews generated from Office Web Apps 2013. Users may see the following error:
"Sorry, something went wrong. An error has occurred on the server."
Upon reviewing verbose SharePoint logs, you may see errors similar to the following:
w3wp.exe (0x3A88) 0x3B28 SharePoint Foundation WOPI ah6ud Unexpected Exiting GetWOPITargetInternal Early - GenerateWacUrl failed to produce a URL/actionEntry for file <filename>.pdf with extension 'PDF' StackTrace: at Microsoft.SharePoint.Utilities.SPWOPIHost.GetWOPITargetInternal(HttpContext httpContext, SPWeb web, Object& spPrimeObject, SPWOPIAction& requestedAction, SPRegionalSettings spSettings, String& wopiAppUrl, String& wopiFavIconUrl, String& wopiAccessToken, Int64& wopiAccessTokenTtl, String& errorMessageToDisplay, String& redirectUrl) at Microsoft.SharePoint.ApplicationPages.WOPIFrameHelper.OnLoadHelper(WOPIFrame frame) at Microsoft.SharePoint.ApplicationPages.WOPIFrameHelper.OnLoad(WOPIFrame frame)
This issue is resolved by installing the following hotfix package on your SharePoint 2013 servers:
Description of the SharePoint Server 2013 hotfix package (Sts-x-none.msp): October 8, 2013.
Note about viewing PDFs in mobile browsers:
There is currently no support for PDF viewing in mobile browsers. You will receive a message "Viewing .PDF files has been disabled in Microsoft Word Mobile viewer". To allow PDFs to open instead with the mobile browser default action, this capability has been removed as of Office Web Apps October 2013 Cumulative Update: http://support.microsoft.com/default.aspx?scid=kb;EN-US;2825686