L_PdfCompInsertNormal

#include "l_bitmap.h"
#include "lpdfComp.h"

L_LCMRC_API L_INT L_PdfCompInsertNormal(hDocHandle, pBitmap)

Compresses the specified image, without segmenting it, and inserts the image in the PDF file in memory.

Parameters

LCPDF_HANDLE hDocHandle

Handle to an existing PDF document. This handle is obtained by calling the L_PdfCompInit function.

pBITMAPHANDLE pBitmap

Pointer to the bitmap handle that references the image to be inserted in the PDF document.

Returns

Value Meaning
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

See Also

Functions

Topics

Example

This example inserts an image to pdf document without using the MRC.

L_INT PdfCompInsertNormalExample(L_VOID) 
{ 
   L_INT          nRet; 
   BITMAPHANDLE   hBitmap; 
   LCPDF_HANDLE   hDocument; 
 
   nRet = L_LoadBitmap (MAKE_IMAGE_PATH(TEXT("Image1.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,MAKE_IMAGE_PATH(TEXT("Output.pdf"))); 
 
   L_PdfCompFree (hDocument); 
   L_FreeBitmap (&hBitmap); 
   return nRet; 
} 

Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Mixed Raster Content (MRC) C API Help