PDF To TIFF (Production Mapping)

ライセンス レベル:BasicStandardAdvanced

サマリ

Exports an existing PDF file to a Tagged Image File Format (TIFF). If the PDF has georeference information, the TIFF can be a GeoTIFF. These TIFFs can be used as a source for heads-up digitizing and viewing in ArcMap. Both OGC and ISO standards of georeferenced PDFs are supported.

使用法

構文

PDFToTIFF_production (in_pdf_file, out_tiff_file, {pdf_password}, {pdf_page_number}, {pdf_map}, {clip_option}, {resolution}, {color_mode}, {tiff_compression}, {geotiff_tags})
パラメータ説明データ タイプ
in_pdf_file

The path and name of the PDF file that is going to be converted into a TIFF.

File
out_tiff_file

The path and name of the output TIFF file.

Raster Dataset
pdf_password
(オプション)

If the PDF is password protected, then the tool requires an appropriate password for processing. Different passwords can be provided based on the security setting embedded in the PDF.

  • If the PDF is protected by restricting access to open the document, then the PDF open password is required.
  • If the PDF is protected by restricting access to copy contents, then the PDF file's permission password is required.
  • If the PDF is protected by restricting access to open and to copy contents, then only the permission password is required.

Encrypted String
pdf_page_number
(オプション)

The page number that contain the content you want to export to TIFF.

Long
pdf_map
(オプション)

Lists each unique map inside the PDF page. 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 ArcMap data frame in that it is the container for spatial data. A PDF map 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 page does contain more than one map, the default is Largest and represents the largest page area in the PDF.

The PDF Map is used for setting the output spatial reference of the TIFF, if the geotiff tags setting is enabled.

The PDF Map is also used to define the extent of the output TIFF, if the Clip Output to Map option is enabled.

String
clip_option
(オプション)

Specifies what should be clipped/extracted.

  • CLIP_TO_MAPOnly extracts the map you choose in PDF MAP.
  • NO_CLIPConverts the entire page you specified into a TIFF. This is the default.
Boolean
resolution
(オプション)

A number that defines the resolution of the exported TIFF in DPI (dots per inch). The default is 250.

Long
color_mode
(オプション)

This value specifies the number of bits used to describe color. The default is RGB_TRUE_COLOR.

  • RGB_TRUE_COLOR32-bit RGBA color. When you choose this option with the JPEG compression, it will produce a 24-bit RGB color.
  • CMYK_TRUE_COLOR32-bit CMYK color.
  • RGB_PALETTE8-bit RGB palette.
String
tiff_compression
(オプション)

This value represents a compression scheme. The default is LZW.

  • LZWLempel-Ziv-Welch, a lossless data compression.
  • DEFLATEA lossless data compression.
  • JPEGJPEG compression. Quality setting is 100.
  • NONECompression is not applied.
  • PACK_BITSPack bits compression.
String
geotiff_tags
(オプション)

If the PDF contains a spatial reference, you can choose to add GeoTIFF tags.

  • GEOTIFF_TAGSAdds GeoTIFF tags to the output unless the PDF has no spatial reference. This is the default.
  • NO_GEOTIFF_TAGSDoes not add GeoTIFF tags, even if the PDF contains a spatial reference.
Boolean

コードのサンプル

PDFToTIFF example 1

This sample runs the required parameters using an ISO PDF.

import arcpy

# Check out Production Mapping extension
arcpy.CheckOutExtension("foundation")

#Define variables
inPDF = r'C:\Project\export.pdf'
outTIFF = r'C:\Project\export.tif'

#Export PDF to GeoTIFF
arcpy.PDFtoTIFF_production(inPDF, outTIFF)
PDFToTIFF example 2

This sample loops through each page of a multi-page OGC PDF, exports each page with some optional parameters set, and finally builds pyramids and calculates statistics on each tif.

import arcpy
import os

# Check out Production Mapping extension
arcpy.CheckOutExtension("foundation")

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

# Create PDFDocument Object from inPDF
pdf = arcpy.mapping.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, CMYK color mode, and JPEG compression
    arcpy.PDFtoTIFF_production(inPDF, outTIFFpath, '#', str(page), '#', '#', 96, 'CMYK_TRUE_COLOR', 'JPEG')

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

    print "Exported " + outTIFFpath

print "Done"

環境

関連トピック

ライセンス情報

ArcGIS for Desktop Basic: ×
ArcGIS for Desktop Standard: 次のものが必要 Production Mapping
ArcGIS for Desktop Advanced: 次のものが必要 Production Mapping
4/26/2014