DTWAIN_SetPDFJpegQuality

Top  Previous  Next

The following function is available only with DTWAIN / PDF.

 

The DTWAIN_SetPDFJpegQuality sets the quality factor of PDF files generated with JPEG data.

 

DTWAIN_BOOL DTWAIN_SetPDFJpegQuality (

DTWAIN_SOURCE

Source,

LONG

Quality );

 

Parameters

Source

An open TWAIN Source.

 

Quality

JPEG quality value.  Valid values range from 1 (very low quality) to 100 (highest quality).

 

 

Return Values

The return value is TRUE if successful.  Otherwise FALSE is returned.

 

Comments

The DTWAIN_SetPDFJpegQuality function sets the current quality of a PDF file if the file contains JPEG data.  The Quality parameter determines the quality of the JPEG image generated for the PDF page.  The quality factor is numbered from 1 (low quality) to 100 (no loss -- very high quality).  The higher the quality factor, the larger in size the acquired PDF file will be.  By default, the quality setting is 75, which is adequate for most PDF files that contain JPEG images.

 

DTWAIN will always create PDF files with JPEG data if the bits-per-pixel for the acquired image is 8 or higher (mostly color and grayscale images).  Otherwise, TIFF Group 4 data is used in the PDF file if black/white (1 bit-per-pixel) images are acquired.  In the latter case, the quality factor does not apply, since TIFF data has no quality setting.

 

TWAIN State Transitions

The Source must be in State 4. or higher

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

 

DTWAIN Source Selection Function

 

See Also

PDF File Options