#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.
Handle to an existing PDF document. This handle is obtained by calling the L_PdfCompInit function.
Index of the page on which the segment is being written. This is a zero-based index.
Pointer to the SEGMENTINFO structure that contains the segment information.
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.
Value | Meaning |
---|---|
SUCCESS | To add the current segment and continue. |
FAILURE | Do not add this segment. Continue to the next segment. |
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