Select to view content in your preferred language

Export PDF from Layout Error

848
3
07-28-2020 09:07 AM
MarkBinder
Frequent Contributor

I may have found a mistake in the exportToPDF documentation for a Layout. The documentation on this page:

Layout—ArcGIS Pro | Documentation 

includes 'embed_color_profile' but I get en error in Python that I have too many arguments when I include a value for that.

The exportToPDF function in Map Series both includes that argument and it works. 

0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor

The documentation is current for ArcGIS Pro 2.6.  It rolled over to the new version yesterday.

Perhaps you could share your expression.

Also it is often useful to use the named parameters, rather than relying on parameter position


... sort of retired...
0 Kudos
MarkBinder
Frequent Contributor

Thanks, I'm still using 2.4.1. Here is the expression:

tempLayout.exportToPDF(mapFolder+pageNames[page]+'.pdf', 300, 'BEST', True, 'JPEG', False, 'None', False, 70, False, True)

It works now since I removed the final argument.

Thanks for the tip on naming the parameters. 

0 Kudos
DanPatterson
MVP Esteemed Contributor

Glad it worked out


... sort of retired...
0 Kudos