PDF To TIFF (Conversion)

Summary

Exports a .pdf file to Tagged Image File Format (TIFF).

Usage

  • If the Input PDF File parameter value includes georeference information, the Output TIFF File parameter value can be a GeoTIFF. A GeoTIFF can be used as a source for digitizing and viewing in ArcGIS Pro.

  • The tool supports both GeoPDF and ISO standards of georeferenced PDF documents.

  • If the Input PDF File parameter value consists of more than one page, the PDF Page Number parameter will display the pages in the .pdf file.

  • If the Input PDF File parameter value does not have a spatial reference, the PDF Map and Write GeoTIFF Tags parameters will be unavailable.

  • 3D GeoPDFs are not supported.

Parameters

LabelExplanationData Type
Input PDF File

The input .pdf file to be exported to TIFF.

File
Output TIFF File

The output .tif file.

Raster Dataset
PDF Password
(Optional)

This parameter is unavailable at ArcGIS 3.2. It will be supported in a future release.

Encrypted String
PDF Page Number
(Optional)

The page number of the PDF document to export to TIFF.

Long
PDF Map
(Optional)

The map that will be exported.

In a .pdf file, a map is a defined container of graphics on the PDF page that has a spatial reference. A PDF map is equivalent to an ArcGIS Pro map in that it is the container for spatial data. A PDF document may have one or more maps. For example, a page may have a main map and an additional smaller overview or key map.

If the Write GeoTIFF Tags parameter value is specified, it will be used to set the output spatial reference of the .tif file.

If the Clip Output to Map parameter value is specified, it will be used to define the extent of the output .tif file.

If the page contains more than one map, each unique map on the PDF page will be listed by name. You can also use the LARGEST option to use the largest map in the PDF. This is the default.

For .pdf files that use the OGC GeoPDF standard, the only supported option is LARGEST.

If the page contains only one map, this parameter will be blank.

String
Clip Output to Map
(Optional)

Specifies whether the entire page or only the map will be exported.

  • Checked—Only the map specified in the PDF Map parameter will be exported to TIFF.
  • Unchecked—The entire page will be exported to TIFF. This is the default.
Boolean
Resolution in dpi
(Optional)

The resolution of the output .tif file in dots per inch (DPI). The default is 250.

Long
Color Mode
(Optional)

Specifies the number of bits that will be used to describe color.

  • RGB true color32-bit RGBA color will be used. If the Compression parameter is set to Jpeg, 24-bit RGB color will be used. This is the default.
Note:

Additional options will be supported in a future release.

String
Compression
(Optional)

Specifies the compression scheme for the output .tif file.

  • LZWLempel-Ziv-Welch, a lossless data compression, will be used. This is the default.
  • DeflateA lossless data compression will be used.
  • JpegJPEG lossy compression will be used. The compression quality will be automatically set to 100 and cannot be changed.
  • NoneCompression will not be applied.
  • PackBitsPackBits lossless compression will be used.
String
Write GeoTIFF Tags
(Optional)

Specifies whether GeoTIFF tags will be added to the output. This parameter is only supported if the Input PDF File parameter value has a spatial reference.

  • Checked—GeoTIFF tags will be added to the output. This is the default.
  • Unchecked—GeoTIFF tags will not be added to the output.
Boolean

arcpy.conversion.PDFToTIFF(in_pdf_file, out_tiff_file, {pdf_password}, {pdf_page_number}, {pdf_map}, {clip_option}, {resolution}, {color_mode}, {tiff_compression}, {geotiff_tags})
NameExplanationData Type
in_pdf_file

The input .pdf file to be exported to TIFF.

File
out_tiff_file

The output .tif file.

Raster Dataset
pdf_password
(Optional)

This parameter is unavailable at ArcGIS 3.2. It will be supported in a future release.

Encrypted String
pdf_page_number
(Optional)

The page number of the PDF document to export to TIFF.

Long
pdf_map
(Optional)

The map that will be exported.

In a .pdf file, a map is a defined container of graphics on the PDF page that has a spatial reference. A PDF map is equivalent to an ArcGIS Pro map in that it is the container for spatial data. A PDF document may have one or more maps. For example, a page may have a main map and an additional smaller overview or key map.

If the geotiff_tags parameter value is specified, it will be used to set the output spatial reference of the .tif file.

If the clip_option parameter value is specified, it will be used to define the extent of the output .tif file.

You can specify the map by name. You can also use the LARGEST option to use the largest map in the PDF. This is the default.

For .pdf files that use the OGC GeoPDF standard, the only supported option is LARGEST.

Note:

When entering the map's name, replace any space with an underscore. For example, My Map becomes My_Map.

String
clip_option
(Optional)

Specifies whether the entire page or only the map will be exported.

  • CLIP_TO_MAPOnly the map specified in the pdf_map parameter will be exported to TIFF.
  • NO_CLIPThe entire page will be exported to TIFF. This is the default.
Boolean
resolution
(Optional)

The resolution of the output .tif file in dots per inch (DPI). The default is 250.

Long
color_mode
(Optional)

Specifies the number of bits that will be used to describe color.

Note:

Additional options will be supported in a future release.

  • RGB_TRUE_COLOR32-bit RGBA color will be used. If the tiff_compression parameter is set to JPEG, 24-bit RGB color will be used. This is the default.
String
tiff_compression
(Optional)

Specifies the compression scheme for the output .tif file.

  • LZWLempel-Ziv-Welch, a lossless data compression, will be used. This is the default.
  • DEFLATEA lossless data compression will be used.
  • JPEGJPEG lossy compression will be used. The compression quality will be automatically set to 100 and cannot be changed.
  • NONECompression will not be applied.
  • PACK_BITSPackBits lossless compression will be used.
String
geotiff_tags
(Optional)

Specifies whether GeoTIFF tags will be added to the output. This parameter is only supported if the in_pdf_file parameter value has a spatial reference.

  • GEOTIFF_TAGSGeoTIFF tags will be added to the output. This is the default.
  • NO_GEOTIFF_TAGSGeoTIFF tags will not be added to the output.
Boolean

Code sample

PDFToTIFF example 1 (Python window)

This sample runs the required parameters using ISO PDF.

import arcpy
inPDF = r'C:\Project\export.pdf'
outTIFF = r'C:\Project\export.tif'
arcpy.conversion.PDFToTIFF(inPDF, outTIFF)
PDFToTIFF example 2 (stand-alone script)

This sample loops through each page of a multipage OGC PDF document, exports each page with some optional parameters set, and builds pyramids and calculates statistics on each TIFF.

import arcpy
import os

# Define variables
inPDF = r'C:\Project\OGC_DDP.pdf'
outTIFF = r'C:\Project\TIFFs'

# Create PDFDocument Object from inPDF
pdf = arcpy.mp.PDFDocumentOpen(inPDF)

# Loop through each page in the PDF and create a name based on the page number
for page in range(1, pdf.pageCount+1):
    name = str(page) + ".tif"
    outTIFFpath = os.path.join(outTIFF, name)

    # Export each page to TIFF using 96 DPI, RGB color mode, and JPEG compression
    arcpy.conversion.PDFToTIFF(inPDF, outTIFFpath, '#', str(page), '#', '#', 96, 
                               'RGB_TRUE_COLOR', 'JPEG')

    # Build pyramids and calculate statistics on each output TIFF
    arcpy.management.BuildPyramidsandStatistics(outTIFF)

    print("Exported " + outTIFFpath)

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics