Convert to image

Operation name

Convert to image

Function Overview

Converts the PDF file available on DataSpider File System, to an image file.

Properties

For details on use of variables, refer to "Variables".
Basic settings
Item name Required/Optional Use of variables Description Remarks
Name Required Not available Enter the name to show on the script canvas.  
Required settings
Item name Required/Optional Use of variables Description Remarks
PDF file path Required Available Enter the PDF file path for conversion.

You can click [Browse] button to launch file chooser and find the file.
Output directory Required Available Enter the directory path to output the converted image file.

You can click [Browse] button to launch directory chooser and find the directory.
  • Specify the directory path as an absolute path of DataSpider File System.
  • Constrained characters of DataSpider File System except for path separator "/" cannot be used.
  • Image file is output with the file name "<PDF file name>_<page number>".
  • If a file with same name exists in the output directory, the contents are overwritten.
Page settings
Item name Required/Optional Use of variables Description Remarks
Page range Optional Available Enter the page range of the PDF file to be converted, using syntax.
For more details, refer to "Syntax of page range".
  • If you do not enter, all the pages are targeted for conversion.
Conversion settings
Item name Required/Optional Use of variables Description Remarks
Conversion format Required - Select the file format for conversion.
  • [JPEG]:(default)
    Converts to JPEG format.
  • [PNG]:
    Converts to PNG format.
  • [GIF]:
    Converts to GIF format.
  • [BMP]:
    Converts to BMP format.
 
Compressibility Required - Select the compressibility of the image after conversion.
  • [No compression]:(default)
    Does not compress.
  • [Low]:
    Compresses the converted image size to low level.
  • [Medium]:
    Compresses the converted image size to medium level.
  • [High]:
    Compresses the converted image size to high level.
  • Enabled only when [jpg] is selected in [Conversion format].
  • The higher the compression ratio, the smaller the image file size, but, the image becomes grainy.
Resolution Required - Select the resolution of the image after conversion.
  • [100dpi]:
    Converts to 100dpi image.
  • [200dpi]:(default)
    Converts to 200dpi image.
  • [300dpi]:
    Converts to 300dpi image.
  • The higher the resolution, the clearer the image, but, the size of the image file becomes large.
Color type Required - Select the color type of the image after conversion.
  • [Original]:(default)
    Output in original color.
  • [Grayscale]:
    Output in gray scale.
  • [Monochrome]:
    Output in monochrome.
Comment
Item name Required/Optional Use of variables Description Remarks
Comment Optional Not available You can write a short description of this adapter.
The description will be reflected in the specifications.
 

Syntax of page range

Following are the syntax available in page range.
Syntax Input example Description
Single 1 If you enter only a page number, only that page is converted.
After 6- If you enter a hyphen after the page number, all pages after that page number are converted.
Before -3 If you enter a hyphen before the page number, all pages before that page number are converted.
Range 2-5 If you enter page numbers connected by hyphen, it is considered as range specification, and pages within that range are converted.

Schema

Input schema

Not available.

Output schema

Not available.

Mass data processing

Mass data processing is not supported.

Transaction

Transaction is not supported.

PSP usage

PSP is not supported.

Available Component Variables

Component variable name Description Remarks
count Converted file count will be stored.
  • Default value is null.
message_category When an error occurs, the corresponding message code's category is stored.
  • Default value is null.
message_code When an error occurs, the corresponding message code is stored.
  • Default value is null.
message_level When an error occurs, the corresponding message code's severity is stored.
  • Default value is null.
error_type When an error occurs, the error type is stored.
  • Default value is null.
  • The error type will be in the following format.
    Example: "java.io.FileNotFoundException"
  • The contents to be stored may vary depending on DataSpider Servista versions.
error_message When an error occurs, the error message is stored.
  • Default value is null.
  • The contents that will be stored may vary depending on DataSpider Servista versions.
error_trace When an error occurs, the error's trace information is stored.
  • Default value is null.
  • The contents that will be stored may vary depending on DataSpider Servista versions and client applications.

Specification limits

Major Exceptions

Exception name Cause Solution
InvalidPropertyConfigurationException
<property name> is not specified.
[<property name>] is not specified. Enter the [<property name>].
InvalidPropertyConfigurationException
Specify a valid page range.
The syntax of [Page range] is invalid. Check whether the syntax of [Page range] is correct.
java.io.FileNotFoundException The file specified in [<property name>] does not exist. Check the [<property name>].
PathIsNotAbsoluteException The path specified for [<property name>] is not an absolute path. Specify an absolute path in [<property name>].
FileIsDirectoryException The path entered in [PDF file path] is a directory. Enter the file path in [PDF file path].
FileIsNotDirectoryException The path entered in [Output directory] is a file. Enter the directory path in [Output directory].