dcpdf_MaxSizeToReconvert

Causes the dcpdf_CreateTiffFromPDF action to use a different conversion algorithm if the file that results from the default algorithm exceeds the specified size.

Member of namespace

dcpdf

Syntax

bool dcpdf_MaxSizeToReconvert (strParam)

Parameters

A Numeric value representing the maximum image size in KB before attempting to convert with an alternate algorithm. If the value is 0, then the alternate algorithm will never be used.

Returns

False if the parameter is not Numeric. Otherwise, True.

Level

Batch or Document level.

Details

Causes dcpdf_CreateTiffFromPDF to use a different algorithm based on the configured file size.

The conversion of PDF to TIFF usually works fast and produces clean images. From time to time, the resulting TIFF may become unusually large. A reason for this has been due to the background becoming a dithered light gray background instead of a pure white. This leads to very large image sizes because compression is now less efficient. It also could lead to reduced recognition quality.

To compensate for these rare situations, this action can be used to produce a clean TIFF from a PDF that compresses well. When a TIFF is created from a PDF, the file size is checked to see if it exceeds the value set by this action. If the file size is smaller, then is considered a successful conversion. If the file size is larger, then this alternate method is performed.

This action must be called prior to dcpdf_CreateTiffFromPDF. If this action is not called, the default value of 2000KB is used. Calling dcpdf_SetImageGrayscale(TRUE) will cause dcpdf_CreateTiffFromPDF(True) to always use the alternate algorithm.

Example:
dcpdf_SetMaxImageSize("10000")
dcpdf_CreateTiffFromPDF("True")

This example will cause the alternate conversion algorithm to be used if the initial conversion produces a TIFF image that is larger than 10000KB.