Using both the mapSeries.exportToPDF() and the layout.exportToPDF(), I am getting different colors than if I had exported the layouts manually in ArcGIS Pro. On layout graphics the export is adding borders even though in the project those borders are set to be no color. I've tried adjusting the various parameters in the exportToPDF() tool with no success.
Left is manually exported, Right is exported through arcpy.
prj = arcpy.mp.ArcGISProject(InputProject) layouts = prj.listLayouts() for layout in layouts: print(layout.name) OutputExport = os.path.join(OutputFolder, layout.name) if not layout.mapSeries is None: ms = layout.mapSeries if ms.enabled: pageNumber = ms.pageCount print(pageNumber) ms.exportToPDF(out_pdf=OutputExport, page_range_type='ALL', multiple_files='PDF_SINGLE_FILE', resolution=900, image_quality='BEST', compress_vector_graphics=True, image_compression='ADAPTIVE', embed_fonts=True, layers_attributes="LAYERS_ONLY", georef_info=True, clip_to_elements=False, show_selection_symbology=False, output_as_image=False, embed_color_profile=True)
Let me know if anyone has any ideas.
Solved! Go to Solution.
Hey Jeff,
Thanks for reaching out. I had difficulties packaging my project, but I did end up figuring out the issue. The layouts were set to be CMYK in the Color Management settings, so switching them back to RGB fixed my issue.
Hi Brett! Would it be possible for you to send me a small PPKX?
Jeff
Hey Jeff,
Thanks for reaching out. I had difficulties packaging my project, but I did end up figuring out the issue. The layouts were set to be CMYK in the Color Management settings, so switching them back to RGB fixed my issue.
Hi Brett, its always great when you answer your own question but ...
We do have a fix going into Pro 2.6 that does address color management in our APIs. Switching to RGB is not always a solution.
Curious, did your outlines go away when you changed to RGB? That doesn't make sense and I can NOT reproduce that scenario.
Also - are you running your scripts stand-alone? Do you see a difference if you perform the same export using CURRENT?
Thanks
Jeff
Hey Jeff,
Did a little testing at your request.
As a heads up, I will be participating in the 2.6 holistic testing, so you can send some tests my way during that for color management if you would like.
Thanks Brett! I can reproduce with a rectangle element. I had tried picture (I thought your title element was a picture). For me it doesn't matter if CM is enabled or not or even color model. I always get the outline. We will look into this for 2.6. Jeff