pPDFCOMP_IMAGECALLBACK Function

Summary

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

Syntax

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

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

See Also

Functions

Topics

Example

For an example, refer to L_PdfCompInsertMRC.

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

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