Insert watermark in pdf created from rtf file

  • Which are the steps to insert a watermark to a sequence of loading a rtf and converting to a pdf.

    if(cexp.BeginDoc(PdfFileName,0))
    {
    char* zsNameWatermark = "WM";
    cexp.StartWatermark(zsNameWatermark);
    cexp.SetTextAttr("Arial", 30, true, false, false);
    cexp.TextOut(100,50,"WaterMark Test: DO NOT COPY");
    cexp.EndWatermark();

    // ????????????
    cexp.StartPage();
    cexp.DrawWatermark(zsNameWatermark, 0);
    cexp.EndPage();

    cexp.ExecCommand(1000,0,"",0); // Initialize the RTF engine
    cexp.ExecCommand(1002,0,"C:\\test.RTF",0); // Load a RTF file
    cexp.ExecCommand(1100,0,"",0); // Export this RTF file to PDF

    cexp.EndDoc();
    }
    This code produce only the first page empthy with the watermark and continue with the rest of the rtf document.

    Is there a way to call DrawWatermark for every page? :(

    Where it should be placed DrawWatermark function to have the same watermark on every page in pdf document?