Hello , thanks for replying . We managed to generate the watermark as we needed with the posted code but after calling the method savetofile the watermark does not remain in pdf document that was saved . the code I am using is :
WPPDF.CommandEx(COMPDF_RenderDrawobjects, 4 + 8 + 32 + 64); // Render
WPPDF.ClearDrawObject(-1, -1); // and Clear all
// save the watermarked PDF...
WPPDF.Plus.SaveToFile(FOutputFileName);