PDF2JPEG

The PDF2JPEG function converts a PDF document to a JPEG document. This function is only available with the JPeg Converter product and requires a call to SetLicenseKey before it can be used.

Syntax

DLL:

long PDF2JPEG( LPCSTR InputFile, LPCSTR Password, LPCSTR OutputFile, long Options, long OptimizeLevel )

Parameters

InputFile

[in] Full path of PDF file to convert to JPeg.

Password

[in] Password, if any, needed to open the PDF file.

OutputFile

[in] Full path of resulting JPeg file(s).

Options

[in] JPeg generation options.

 

DLL Constants

Value

Notes

 

0x00000000

 

JPEGOPTION_DEFAULT

0x012C0007

300 DPI, JPeg level 7

JPEGOPTION_LOW

0x00960003

low resolution 150 DPI, JPeg level 3

JPEGOPTION_MEDIUM

0x012C0007

300 DPI, JPeg level 7

JPEGOPTION_HIGH

0x02580009

High resolution 600 DPI, JPeg level 9 (could be very slow)

 

OptimizeLevel

[in] Optimization level to apply to PDF document before exporting to JPEG.

 

Permission

Value

No optimization

0

Line optimization (Recommended)

1

Paragraph optimization

2

Table optimization

3

 

Return Value

The return value is True if the document was converted, False otherwise.

Remarks

This function is only available if the activation code is for the JPeg Converter product, or a JPeg Converter product combined with other Document Converter products.

When the PDF document consists of multiple pages, one JPeg file is generated for every page with the page index appended to the supplied file name.

The Options value is a combination of the image resolution in the high order word, and the JPeg compression level from 1 (highest) to 9 (lowest) in the low order word.

 

A JPeg compression level of 0 produces uncompressed 24-bit bitmaps. The file extension should be set to .bmp in this case.

 

C++ Example

 

// enable advanced functions such as Encryption, Linearization or

// Printing

SetLicenseKey( "Evaluation Version", "07EFCDA00...621AEBEBF2975B" );

// convert a PDF document to JPeg

PDF2JPEG( "c:\\test.pdf", "", "c:\\test.jpeg", JPEGOPTION_DEFAULT, 0 );