• Julian I am trying to paint a watermark behind the print of a PDF. The watermark is a JPEG loaded into a TPicture. See comments in the code for the problem. Can you help me, please.

    I am using the following code:


    [/code]

    • Offizieller Beitrag

    Hi,

    for watermarks dont use StretchDraw - you cannot reuse the image this way.

    See watermark demo:

  • Thanks for the reply Julian. Very quick as always.

    I couldn't use the paint page and page watermark together approach because I am generating the PDF from a WPRichText. Perhaps I should have stated that.

    The solution was that the resulution (LRes var) has to be set to
    Source.Memo.RTFData.RTFProps.FFontXPixelsPerInch & FFontYPixelsPerInch, I assume because this is what is used WPRichText uses when it outputs to the PDF.

    Arcobat reader did not like my original JPEG when drawn with DrawTGraphic, so I created a new JPEG which works fine.

    Interestingly Canvas.StretchDraw does work, but there is no need now I can use DrawTGraphic.