ArcGIS 10.4 ArcPy ExporttoPDF only exports parts of layers

4926
8
Jump to solution
05-26-2016 05:29 PM
NeoGeo
by
Occasional Contributor III

While attempting to migrate to ArcGIS 10.4 from 10.2, I am finding that the 10.4 version of ExportToPDF in ArcPy is only generating portions of layers.  I have attached a pdf to show that the points and boundaries started to render and just stopped a quarter of the way through.

I saw that in 10.3 there was a bug that caused similar errors but it was related to region settings and did not affect english versions, so I will add that I am using US english version of 10.4 so that bug should not apply.

I have also tested with a super basic script  (like below)and recreated the mxd in Desktop 10.4 and it still only renders a portion of the map.

import arcpy
print "Start Generating PDF Output..."
mxd = arcpy.mapping.MapDocument(r"F:\arcgisserver\arcgisresources\ExportPDF\Layouts\Landscape8x11.mxd")
arcpy.mapping.ExportToPDF(mxd, r"F:\data\temp\temp\Test_ArcPy_Mapping_ExportToPDFProject.pdf")
print "Finished generating output.  Check c:\\temp"
del mxd
0 Kudos
1 Solution

Accepted Solutions
KoryKramer
Esri Community Moderator

This has been logged as [BUG-000094602: In ArcGIS 10.4 for Desktop, some or all parts of a service layer disappear when exported to PDF] and is marked with a high priority.

If you're experiencing this issue, please log a case with Esri Technical Support to let them know that you're experiencing this issue and get attached to the bug.

View solution in original post

8 Replies
NeoGeo
by
Occasional Contributor III

I just found that 10.4.1 release was released and installed it, but it did not help.  After more testing, the problem in the 10.4.x version seems to be a bug in handling ArcGIS server services.  Flat files like shapefiles seem to be rendering ok, but services are not.  I tried both ArcGIS server services from both ArcGIS Server 10.2 and 10.4 in the mxd, but it fails on rendering both.  It is strange that it sometimes renders part of it though, almost as if it times out and pulls the plug partway through.  This is odd since it worked in 10.0, 10.1, and 10.2 (not sure about 10.3). 

0 Kudos
NeoGeo
by
Occasional Contributor III

I have opened an ESRI tech support ticket for this issue.  They had me try it in ArcMap without ArcPy and it turns out that the problem exists in Desktop 10.4.1 just doing an export to pdf without any programming.  They were able to recreate the problem on their side.  Will update this when I have more information.

PeterSchoenfield
New Contributor III

Lake County, Illinois has just stumbled on this issue too. Our tech support contact was able to reproduce. It seems to happen when you have a service from ArcGIS Online or ArcGIS Server in your MXD. The export to pdf function (and SVG and perhaps others) are unable to completely render the AGOL/AGS service. We are attempting to get attached to your issue, that will help speed this through tech support. I will update this post with a BUG number when we have one.

0 Kudos
KoryKramer
Esri Community Moderator

This has been logged as [BUG-000094602: In ArcGIS 10.4 for Desktop, some or all parts of a service layer disappear when exported to PDF] and is marked with a high priority.

If you're experiencing this issue, please log a case with Esri Technical Support to let them know that you're experiencing this issue and get attached to the bug.

ChrisRobinson
New Contributor III

Hi All,

I stumbled across this issue yesterday while trying to export out a map that had a map service.  I just had just upgraded from 10.3 to 10.4 and this is within desktop, not using ArcPy.  The map service was not cached and would only export out the top quarter of the map page.  The other layer (point feature class located in a file geodatabase) exported just fine.  I then tried a cached image service and that fully exported.  I then tried a cached map service and that also exported fully.  Could it be something with dynamic map services?

Chris

0 Kudos
NeoGeo
by
Occasional Contributor III

At the time I was testing 10.4 and then 10.4.1, ESRI had confirmed this was a bug and that there was no fix or workaround yet.  I was forced to migrate backward to 10.3.1 because of the following bugs which had no fixes

1) This one - pdf exports only partially both in Desktop and in Scripts (still no fix at the time I write this)

2) Services which took 10-15 seconds to publish in 10.2-10.3 took 15-20 minutes on 10.4.1 resulting in that much service downtime.  (per my other thread, ESRI later released a bug fix for this)

3) Bing maps do not work in PDF exports with ArcPy on ArcGIS server (does work on desktop).  This one was broken in previous versions as well, just not fixed yet.

4) Not compatible with SQL Server 2008 R2 (This one is not a bug.  ESRI does not claim it is supposed to work.  Do not try it even temporarily.  It caused corruption when testing to see if we could temporarily get by)

RandyMcGregor
New Contributor III

I am having a similar problem (I think). I have a bat file that exports map sheets nightly. I got so used to it working that I was caught off guard when told that no sheets had been exported for several nights.

Turns out that, at 10.4, it started failing. When I look at the output, the last three sheets (pdfs) have fewer and fewer features on them.

0 Kudos
RandyMcGregor
New Contributor III

Just to clarify: This bat file runs a python script that uses ExportToPDF with data driven pages.

0 Kudos