Hi,
I have define a watermark in IRM Administrator with the following stamp item:
#-- Stamp item --#
begin_message
Name (Total number of pages)
StartPage (1)
EndPage (-1)
Size (48)
Color (70)
Text Total number of pages: %G
Position (top)
Justification (center)
Underlay (yes)
end_message
I try to get the watermark text value by make the following function call:
irmStat = irmApplyContentWatermarks(
accCtx,
applyWMRtn,
onFocusDoc,
IRM_WATERMARK_UNDERLAY,
fullPath,
fileName,
10, // totalPages
1,
contentInfoRtn,
onFocusDoc);
which the applyWMRtn will write the watermark info to log file:
IRMStatus IrmDocument::applyWMRtn( void * arg, const IRMWatermark * irmWatermark)
{
WriteLog("Watermark Text: %S", irmWatermark->text);
return IRM_S_SUCCESS;
}
However, it doesn't return the correct value for the variable %G.
The result is: Total number of pages: ld
I have tested with other variables (eg: fileName - %N, fullPath - %P) and it does return the correct value.
Is there anything wrong about the parameter that supply to the irmApplyContentWatermarks function call?