pdf_SaveDIBAsColorPDFPage

 

PDF_ERROR pdf_SaveDIBAsColorPDFPage( HPDF        pPDF,
HANDLE hDIB,
LPCSTR   szDllName,
DWORD   dwCompression,
int              nLossRatio);

 Description

Save a DIB as a color page in the PDF file. The page is reformatted to fit the image. The TIFF DLL is loaded dynamically when it is needed from the path specified in szDllName

Parameters

HPDF

pPDF

pointer to the PDF object

HANDLE

hDIB

The DIB to be saved  NOTE:  The color depth of the DIB must be a 1 bit

LPCTSTR

szDllName

The string containing the path and the full name of the BITIFF.DLL for 1 bit images or the JPEG.DLL for 24 bit images.

DWORD

dwCompression

This specifies the compression method used to compress the images.  Available options are:

1-bit:  FLAG_FILTER_NO_COMPRESSION
FLAG_FILTER_CCITT_FAX_DECODE
FLAG_FILTER_FLAT_DECODE

8-bit:  FLAG_FILTER_NO_COMPRESSION
FLAG_FILTER_RUNLENGTH_DECODE
FLAG_FILTER_FLAT_DECODE

8-bit grayscale:
FLAG_FILTER_NO_COMPRESSION
FLAG_FILTER_RUNLENGTH_DECODE
FLAG_FILTER_FLAT_DECODE

24-bit: FLAG_FILTER_NO_COMPRESSION
FLAG_FILTER_DCT_JPEG_DECODE
FLAG_FILTER_FLAT_DECODE

int

nLossRatio

Only used when JPEG compression is selected, is ignored for the rest of the compression methods.  Can be between 0 and 100.

Return values

Returns a PDF_ERROR if any error occured. Call PDF_GetLastError() for the error code.