Cross post from web developers, since this is more server based I think:
I have several services with a geodatabase feature class having attachments. These attachments are almost always PDFs. After much experimenting I have noticed that any PDF over 5MB in size will load as gibberish in the browser window.
To narrow this down to ArcGIS server, I put the same file out in a directory on the web server and browsed to it and it opened fine in the browser using the Acrobat plugin. Previous web searches had led me to believe there might be a problem with the plugin, but since it displays fine outside of a ArcGIS map service I believe the plugin and the web server (Tomcat) are configured correctly.
Is there some minimum size limit or buffer size in the REST configuration I need to enlarge? Because it seems to always be around 5MB I get the impression there is some coded limitation somewhere that needs to be increased.
Are you working with Map Services or Feature Services? A similar issue was fixed in 10.4.1 for Feature Services, but there's a separate issue with Map Services that's fixed in 10.5.
[#BUG-000097244 PDF attachments for map services from ArcGIS 10.4.1 for Server and earlier that are over 5MB in size fail to display properly in web browsers. ]
if you Right-click the PDF attachment in the pop-up and download the PDF instead of opening in the browser, do you still see the corruption? That's the work around for the issue above. I'd like to make sure I'm providing the correct information.
http://downloads.esri.com/support/downloads/other_/105-IssuesAddressedList_12082016.pdf
If moving to 10.5 isn't an option, I'd contact support and report the issue in a support case so that you're added to the list of users affected by this bug ,then raise it to your account manager.
Thanks for the reply, Randall. I did call it into support and found that, yes, it is the Map Service that is giving me troubles. I'm quite let down now as my option is to upgrade to 10.5 (I just got us to 10.4.1 from 10.1!) or cache the services to use in my AGOL map/app so I can link the popup box to the feature service (I don't like cache, I mean I like cash, but I was not the Powerball winner, so this is still my problem). I was told that desktops being at 10.4.1 could still publish to a 10.5 server though. I'm already trying to work around the lack of AGOL allowing layer groupings by using Map Services (a long overdue enhancement, in the works ENH-000090007). This upgrading stuff doesn't sell itself very well sometimes. I like the idea of raising this with my account manager - will do.
For clarification for anyone else that happens upon this post BUG-000090171 was implemented at 10.4.1 and 10.5 for feature services; however BUG-000097244 was implemented at 10.5 for dynamic services.
I'm still having issues with this at 10.4.1. All patches have been applied on the server.
We're upgrading to Enterprise 10.5 soon. Hopefully this will have been fixed. It has caused us endless headaches and time wasted trying to make our PDFs smaller.
We recently built a new server with a fresh install of 10.5.1 with Portal and all is working just fine. Our pdf sizes run from 1 mb to 30.7 mb in size.