pPDFCOMP_IMAGECALLBACK Function

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

L_INT pEXT_CALLBACK pPDFCOMP_IMAGECALLBACK (hDocument, nPage, pSegmentInfo, UserData)

This callback function is called every time a segment is added to the PDF document.

Parameters

LCPDF_HANDLE hDocument

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

L_INT nPage

Index of the page on which the segment is being written. This is a zero-based index.

LPSEGMENTINFO pSegmentInfo

Pointer to the SEGMENTINFO structure that contains the segment information.

HANDLE UserData

Handle that you can use to access a variable or structure containing data that your callback function needs. This gives you a way to receive data indirectly from the function that uses this callback function. This is the same pointer that you pass in the UserData parameter of the L_PdfCompInit function.

Keep in mind that this is a void pointer, which must be cast to the appropriate data type within your callback function.

Returns

Value Meaning
SUCCESS To add the current segment and continue.
FAILURE Do not add this segment. Continue to the next segment.

Comments

This call back is called each time an MRC segment is added to the PDF file in memory, by calling L_PdfCompInsertMRC.

The user should return SUCCESS to add the current segment and continue with the process, or FAILURE, to not add this segment and proceed with the next one.

Required DLLs and Libraries

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

LEADTOOLS Mixed Raster Content (MRC) C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.