Select to view content in your preferred language

ArcPy ExportToPDF Parameter Values Missing

2258
2
10-14-2010 08:38 AM
by Anonymous User
Not applicable
Original User: farsterbj

I am using ExportToPDF in a Python script.  With none of the optional parameters set, the export works great.  Now I want to define some parameters to tweak the PDF file size and such.

I am finding that some of the values for the 'image_compression' parameter are not available; namely JPEG and ADAPTIVE.  These parameter values are not available in the Python Window in ArcGIS, and if defined in a Python script, throw errors when the script is run.

I have attached a screenshot showing the available values for the 'image_compression' parameter in the Python Window in ArcGIS.  Also, note in the attached screenshot that the 'jpeg_compression_quality' parameter is not even an option.

Can anybody shed light on why these parameters are in the documentation but are not accessible from the Python Window or when running a Python script?

Thanks in advance,

Brad
0 Kudos
2 Replies
JasonScheirer
Regular Contributor II
I am using ExportToPDF in a Python script. With none of the optional parameters set, the export works great. Now I want to define some parameters to tweak the PDF file size and such. 

I am finding that some of the values for the 'image_compression' parameter are not available; namely JPEG and ADAPTIVE. These parameter values are not available in the Python Window in ArcGIS, and if defined in a Python script, throw errors when the script is run. 

I have attached a screenshot showing the available values for the 'image_compression' parameter in the Python Window in ArcGIS. Also, note in the attached screenshot that the 'jpeg_compression_quality' parameter is not even an option. 

Can anybody shed light on why these parameters are in the   documentation but are not accessible from the Python Window or when running a Python script? 

Thanks in advance, 

Brad


It's safer to use None than an empty string to specify unset parameters. It's even better to skip straight to them with named arguments e.g. arcpy.mapping.ExportToPDF(mxd, "c:\\text\\out.pdf", resolution=300, image_compression="LZW")


I don't think jpeg_compression_quality is available until 10.0 SP1.
0 Kudos
by Anonymous User
Not applicable
Original User: jbarrette

Brad,

Thanks for your post.  These options were addressed for SP1.  I think the SP1 help modifications got posted to the web help sooner than it should have.  SP1 is due out soon.

Jeff
0 Kudos