pPDFCOMP_IMAGECALLBACK Function
#include "l_bitmap.h"
#include "lpdfComp.h"
L_INT pEXT_CALLBACK pPDFCOMP_IMAGECALLBACK (hDocument, nPage, pSegmentInfo, UserData)
LCPDF_HANDLE hDocument; |
/* handle to an existing PDF document */ |
L_INT nPage; |
/* current page index */ |
LPSEGMENTINFO pSegmentInfo; |
/* pointer to the SEGMENTINFO structure */ |
HANDLE UserData; |
/* user data handle*/ |
This callback function is called every time a segment is added to the PDF document.
Parameter |
Description |
hDocument |
Handle to an existing PDF document. This handle is obtained by calling the L_PdfCompInit function. |
nPage |
Index of the page on which the segment is being written. This is a zero-based index. |
pSegmentInfo |
Pointer to the SEGMENTINFO structure that contains the segment information. |
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
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
LCPMRC 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
For an example, refer to L_PdfCompInsertMRC.