L_PdfCompInsertNormal
#include "l_bitmap.h"
#include "lpdfComp.h"
L_INT EXT_FUNCTION L_PdfCompInsertNormal(hDocument, pBitmap)
LCPDF_HANDLE hDocument; |
/* handle to an existing PDF document */ |
pBITMAPHANDLE pBitmap; |
/* pointer to bitmap handle */ |
Compresses the specified image, without segmenting it, and inserts the image in the PDF file in memory.
Parameter |
Description |
hDocument |
Handle to an existing PDF document. This handle is obtained by calling the L_PdfCompInit function. |
pBitmap |
Pointer to the bitmap handle that references the image to be inserted in the PDF document. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
To segment an image using MRC segmentation, compress it, and insert the bitmap to the PDF file in memory, call L_PdfCompInsertMRC.
Required DLLs and Libraries
LCMRC For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
See Also
Functions: |
|
Topics: |
|
|
Example
/* This example inserts an image to pdf document without using the MRC */
L_INT TestPdfCompInserNormal(L_VOID)
{
L_INT nRet;
BITMAPHANDLE hBitmap;
LCPDF_HANDLE hDocument;
nRet = L_LoadBitmap ("C:\\Image.CMP", &hBitmap,sizeof(BITMAPHANDLE),0,ORDER_RGB,NULL,NULL);
if(nRet != SUCCESS)
{
return nRet;
}
nRet = L_PdfCompInit (&hDocument,NULL,NULL);
if(nRet != SUCCESS)
{
return nRet;
}
nRet = L_PdfCompInsertNormal(hDocument,&hBitmap);
if(nRet != SUCCESS)
{
L_PdfCompFree (hDocument);
return nRet;
}
nRet = L_PdfCompWrite (hDocument,"C:\\Output.pdf");
L_PdfCompFree (hDocument);
return nRet;
}