Convert PDF

Enables the automatic conversion of PDF documents to PostScript or image files.

For information about using the Convert PDF service, see AEM forms Services .

toImage operation

Converts a PDF document to an image file. Supported image formats are JPEG, JPEG2000, PNG, and TIFF.

The following information applies to conversions to TIFF images:

  • A multi-page TIFF file is generated.

  • Some annotations are not included in TIFF images. Annotations that require Acrobat to generate their appearance are not included.

For information about the General and Route Evaluation property groups, see Common operation properties .

Input properties

Properties to specify the document to be converted and the conversion options.

PDF Document

The document value that represents the PDF document to be converted.

If you provide a literal value, clicking the ellipsis button  displays the Select Asset dialog box. (See About Select Asset .)

Convert Image Options

A ToImageOptionsSpec value that contains various preferences used to convert the PDF document to an image file. With the exception of the conversion format, which must be specified, default values for preferences are used if no value is specified.

If you provide a literal value, the availability of the following options depend on the value chosen for the Image Conversion Format option.

Image Conversion Format:
The format to convert an image to. The default is JPEG . The following values are valid.
  • JPEG: The Joint Photographics Experts Group is a lossy image compression format.

  • JPEG2000: The Joint Photographics Experts Group 2000 is a wavelet-based image compression format to replace the JPEG format.

  • PNG: The Portable Network Graphics is a lossless image compression format.

  • TIFF: The Tagged Image File Format is generally a lossless image compression format.

Grayscale Compression:
The gray scale compression to use. This option is available when the Image Conversion Format option is a value of JPEG, JPEG2000, or TIFF. No default is provided. The following values are valid.
  • Minimum: The minimum level of gray scale compression.

  • Low: A low level of gray scale compression.

  • Medium: A medium level of gray scale compression.

  • High: A high level of gray scale compression.

  • Maximum: The maximum level of gray scale compression.

Color Compression:
The color compression to use. No default is provided. This option is available when the Image Conversion Format option is a value of JPEG, JPEG2000, or TIFF.
  • Minimum: The minimum level of color compression.

  • Low: A low level of color compression.

  • Medium: A medium level of color compression.

  • High: A high level of color compression.

  • Maximum: The maximum level of color compression.

JPEG Format:
The JPEG format to use. The default is Baseline Standard . This option is available when the Image Conversion Format option is a value of JPEG.The following values are valid.
  • Baseline Standard: Displays the image when it is fully downloaded. This JPEG format is recognizable to most web browsers.

  • Baseline Optimized: Optimizes color quality of the image and produces smaller file sizes but is not supported by all web browsers.

  • 3 scans: Downloads the image first as a low-resolution image, with incremental quality improvements as downloading continues in three scans.

  • 4 scans: Downloads the image first as a low-resolution image, with incremental quality improvements as downloading continues in four scans.

  • 5 scans: Downloads the image first as a low-resolution image, with incremental quality improvements as downloading continues in five scans.

RGB Policy:
The type of color management typical for display on screens to be applied to the output file and whether to embed an ICC profile. The default is Embed Profile . The following values are valid.
  • Embed Profile: Embed an ICC profile.

  • Off: Do not embed an ICC profile.

CMYK Policy:
The type of color management typical for print to be applied to the output file and whether to embed an ICC profile. This option is available when the Image Conversion Format option is a value of JPEG, JPEG2000, or TIFF. The default is Off . The following values are valid.
  • Embed Profile: Embed an ICC profile.

  • Off: Do not embed an ICC profile.

Grayscale Policy:
The gray scale management to be applied to the output file and whether to embed an ICC profile. The default is Off . The following values are valid.
  • Embed Profile: Embed an ICC profile.

  • Off: Do not embed an ICC profile.

Color Space:
The color space management scheme to use. The default is Determine Automatically . The following values are valid.
  • RGB : Use the Red, Green, and Blue color space typical for display on a screen.

  • CMYK : Use the Cyan, Magenta, Yellow, and Key (Black) color space management typical for print.

  • Grayscale : Use gray scale color space management.

  • Determine Automatically : The color space to use is determined automatically.

Resolution:
The dots per inch (dpi) that specifies the resolution of the image. No default is provided. You can type any value, but the common values to use are 72, 96, 150, 300, 600, 1200, and 2400.

Include Comments:
Whether to preserve the appearance of comments in the resulting image file. The default is True , which means to preserve the appearance of the comments.

Image Size Width:
Sets the width of the image. No default value is provided. The default measurement unit is In. The valid values of measure that can be selected are in (inches), mm (millimeters), cm (centimeters), and in (points).

Image Size Height:
Sets the height of the image. No default value is provided. The default measurement unit is In. The valid values of measure that can be selected are in (inches), mm (millimeters), cm (centimeters), and in (points).

Page Range:
The page numbers and page ranges delimited by a comma. For example, to print page 22, pages 7 to 9, and page 13, type 2, 7-9, 13. No default is provided.

Rows Per Strip:
The number of rows of pixels per strip to use for encoding the TIFF image. This option is available when the Image Conversion Format option is a value of TIFF. A value greater than zero specifies the number of rows per strip. A value of 0 sets the rows per strip equal to the image length, resulting in a single strip. The default of -1 sets the rows per strip equal to infinity, resulting in a single strip.

Tile Size:
The image tile size in pixels. This option is available when the Image Conversion Format option is a value JPEG2000. The default is 256 . Valid values are 128 - 2048 (pixels).

Interlace:
Specifies whether the image is interlaced. This option is available when the Image Conversion Format option is a value of PNG. The default is None . The following values are valid.
  • None: Creates an image that displays in a web browser only after downloading is complete.

  • Adam7: Creates an image that displays low-resolution versions in a browser while the full image file is downloading.

PNG Filter:
The filtering algorithm to use for the image. This option is available when the Image Conversion Format option is a value of PNG. The default is Adaptive . The following values are valid.
  • None: Compresses the image without a filter. Recommended for indexed-color and bitmap-mode images.

  • Sub: Optimizes the compression of images with even horizontal patterns or blends.

  • Up: Optimizes the compression of images with even vertical patterns.

  • Average: Optimizes the compression of low-level noise by averaging the color values of adjacent pixels.

  • Paeth: Optimizes the compression of low-level noise by reassigning adjacent color values.

  • Adaptive: Applies one of the filtering algorithms best suited for the image, such as Sub, Up, Average, or Paeth. Select Adaptive when it is uncertain which PNG filter to use.

Monochrome Compression:
The compression format to use. This option is available when the Image Conversion Format option is a value of TIFF. The default is CCITT G4 . The following values are valid.
  • None: Specifies not to use compression.

  • CCITT G3: International Coordinating Committee for Telephony and Telegraphy Group 3 compression algorithm that compresses an image one row at a time.

  • CCITT G4: International Coordinating Committee for Telephony and Telegraphy Group 4 compression algorithm that compresses an image one row at a time and, in general, produces the smallest file sizes.

  • LZW: A table-based lookup compression algorithm.

  • ZIP: A compression algorithm that is best suited for images with large areas of single colors or repeating patterns.

Multipage TIFF:
Sets whether the output TIFF should span multiple pages when converting a PDF file. This option is available when the Image Conversion Format option is TIFF. A value of False means that multiple image files are used for an individual page in the PDF file. The default is True , which means that a single TIFF image is returned for a single PDF file.

Output properties

Property for the output image file.

Result

The location to store the output image files. The data type is a list of document values.

For information about retrieving values from a list, see Accessing data in data collections .

Exceptions

This operation can throw a ConvertPDFException exception.

toPS2 operation

Converts a PDF document to a PostScript file.

For information about the General and Route Evaluation property groups, see Common operation properties .

Input properties

Properties to specify the PDF document and PostScript level.

PDF Document

The document value representing the PDF document to be converted.

If you provide a literal value, clicking the ellipsis button  displays the Select Asset dialog box. (See About Select Asset .)

Convert PostScript Options

A ToPSOptionsSpec value that contains various preferences used to convert the PDF document to an image file. With the exception of the conversion format, which must be specified, default values for preferences are used if no value is specified.

If you provide a literal value, the following groups of options are available.

General:
The group of options to chose the resolution, page size, and printing range.
  • Resolution (DPI): The resolution of the output in dots per inch (dpi). The default is 300 .

  • Page Range: The page numbers and page ranges delimited by a comma. For example, to print page 22, pages 7 to 9, and page 13, type 2, 7-9, 13 . No default is provided.

  • Page Size: The page size of the PostScript output. The default is DetermineAutomatically . The following are valid values:

    • A2 , A3 , A4 , A5 , Envelop , Executive , Folio , Legal , Letter , Tabloid

    • DetermineAutomatically: Specifies that the service determines the page size to use.

    • Custom: When selected, the height and width can be typed in the respective Height and Width boxes. The default measurement unit is Pt. The valid values of measure that can be selected are Pt (points), in. (inches), mm (millimeters), and cm (centimeters).

Output:
The group of options that specifies printing options.
  • Include Comments: Sets whether to preserve the appearance of comments in the resulting PostScript file. A value of True means to preserve the appearance of comments in the resulting PostScript file. The default is False , which means not to preserve the appearance of comments in the resulting PostScript file.

  • Convert TrueType To Type 1 : Sets whether to convert TrueType fonts to Type 1 fonts in the resulting file. A value of True means to convert TrueType fonts to Type 1 fonts. The default is False , which means not to perform the conversion.

  • Font Inclusion: The fonts that are to be included in the resulting PostScript file. The default is Embedded Fonts . The following are valid values.

    • None: The system fonts are used instead of the embedded fonts and referenced fonts.

    • Embedded Fonts: The fonts used are taken directly from the PDF file.

    • Embedded Fonts and Referenced Fonts: The fonts used are taken from the PDF file and the system in use.

  • Emit CIDFontType2: Sets whether to preserve the hinting information in the original font in the resulting PostScript file. A value of True means to emit only CIDFontType2 fonts. The default is False , which means that the CIDFontType2 fonts are converted to CIDFontType0 fonts, resulting in compatibility with a wider range of printers.

  • Shrink to Fit: Sets whether to shrink the contents of the input PDF file to fit the selected page size. A value of True means to shrink the contents of the input PDF file. The default is False ,which means not to shrink the contents.

  • Expand to Fit: Sets whether to expand the contents of the input PDF file to fit the selected page size. A value of True means to expand the contents of the PDF file to fit the selected page size. The default is False , which means not to expand the contents.

  • Rotate and Center: Sets whether to rotate and center the contents of the input PDF file in the selected page. A value of True means to rotate and center the contents of the PDF file. The default is False , which means not to center or rotate the contents.

  • Reverse: Sets whether to reverse the contents of the input PDF file in the page. A value of True means to reverse the contents of the input PDF File in the page. The default is False , which means not to reverse the contents.

Marks and Bleeds:
The group of options for the marks to add to the resulting PostScript file.
  • Trim Marks: Sets whether to place a mark in each of the four corners to indicate the PDF trim box boundaries. A value of True means to include the trim marks. The default is False , which means not to include the trim marks.

  • Bleed Marks: Sets whether to place a mark in each of the four corners to indicate the PDF bleed box boundaries. A value of True means to place a mark in each of the four corners to indicate the PDF bleed box boundaries. The default is False , which means not to place the bleed marks.

  • Registration Marks: Sets whether to place a registration mark outside the crop area of the page. A value of True means to place a registration mark outside the crop area of the page. The default is False , which means not to place a registration mark.

  • Color Bars: Sets whether to place a color bar at the top of the page, outside the crop area. A color bar shows a single box for each spot or process color in the document. A value of True specifies to place a color bar in the document. The default is False , which means not to place a color bar.

  • Page Information: Sets whether to place page information outside the crop area of the page. A value of True specifies to place page information outside of the crop area of the page. The default is False , which means not place page information on the page.

  • Line Weight: The weight of the lines used for the trim marks, bleed marks, and registration marks. The default is 0.25 pt . The values that can be selected are 0.125 pt , 0.25 pt , and 0.50 pt .

  • Style: The style of the printer marks to create. The default is Default . The following values are valid.

    • Default: Adobe InDesign print marking conventions.

    • InDesignJ1: Adobe InDesign print marking conventions, first Japanese ID.

    • InDesignJ2: Adobe InDesign print marking conventions, second Japanese ID

    • Illustrator: Adobe InDesign print marking conventions.

    • IllustratorJ: Adobe InDesign print marking conventions, Japanese ID.

    • QuarkXPress: QuarkXpress print marking conventions.

PostScript:
The group of options to specify PostScript parameters.
  • PostScript: The PostScript language compatibility. The default is Language Level 2 . The following values are valid.

    • Language Level 2: The PostScript language that was released in 1992 supports color printing.

    • Language Level 3: The PostScript language that was released in 1997 supports more fonts, has better graphics handling, and includes several features to speed up PostScript printing.

  • Allow Binary Content: Sets whether to create the PostScript file in binary format. The default is False , which means not to create it in binary format.

  • Use Maximum Available JPEG2000 Image Resolution: Sets whether to use the highest resolution for printing JPEG 2000 images. The default is True , which means to use the highest resolution possible. If a value of False is chosen, the pixels per inch selected is the value configured in the Resolution option.

  • Emit PS Form Objects: Sets whether to emit form objects for Form XObjects, which are used to represent complex objects that appear multiple times in the PDF file. A value of True means that the overall size of the print job may be reduced, but the printer memory used is increased. The default is False , which means not to emit the form objects.

  • Color: Sets whether to use color and to produce one page of output per page. The default is Composite .

    • Composite: Produce a PostScript file that includes color.

    • Composite Gray: Produce a PostScript file that does not include color.

Output properties

Output Postscript

The location to store the converted PostScript file. The data type is document .

Exceptions

This operation can throw a ConvertPDFException exception.

toSWF operation

Converts a PDF document to an SWF file. The resulting SWF files are returned as java.util.List of com.adobe.idp.Document.

For information about the General and Route Evaluation property groups, see Common operation properties .

Input properties

Properties to specify the document to be converted and the conversion options.

PDF Document

The document value that represents the PDF document to be converted.

If you provide a literal value, clicking the ellipsis button  displays the Select Asset dialog box. (See About Select Asset .)

Convert SWF Options

A ToSWFOptionsSpec value that contains various preferences used to convert the PDF document to an SWF file. With the exception of the conversion format, which must be specified, default values for preferences are used if no value is specified.

The following preferences are available.

Height: Sets the height of the SWF file.

Width: Sets the width of the SWF file.

Version: Specifies the version with which the SWF file will be encoded.

Sample X: Sets the down-sampling factor of the image in x direction.

Sample Y: Sets the down-sampling factor of the image in y direction.

Process Signature: Specifies whether signed signature fields are processed during conversion.

Page Range : Specifies the pages to be converted.

Output properties

Property for the output SWF file.

Result

The location to store the output SWF files. The data type is a list of document values.

For information about retrieving values from a list, see Accessing data in data collections .

Exceptions

This operation can throw ConvertPDFException or DSCException exception.

Convert PDF exceptions

The Convert PDF service provides the following exceptions for throwing exception events.

ConvertPDFException

Thrown if an error occurs during a Convert PDF operation.

DSCException

Thrown if an error occurs during a Convert PDF operation.