Useimage / Addimage problem

  • hi, im trying to use the methods addimage/useimage but not successful.
    first i use this function :

    Code
    id:=CommandStr(COMPDF_AddJPEG,extractfilepath(application.exename)+ 'data.jpg');

    thats returns "1" so i thinks its ok but when i use useimage,for example, with

    Code
    pdf.Plus.UseImage(id,1,1,1,300,600,0,[])
    or 
    pdf.Plus.UseImage(id,1,1,1,300,600,0,[wpUnderPage])

    i cant see the "data.jpg" as watermark as i hope

    help, regards.

    • Offizieller Beitrag

    Hi,

    please note that the image is added to the PDF file when you save it. It is not displayed by the viewer at once.

    The command to do this are:

    Zitat

    COMPDF_AddJPEG = 320; // param=filename, result = id
    COMPDF_ImagePrint = 321; // param = TPDFPrintImageRec ptr

    If you need to add info for view and printing (not display) use

    COMPDF_SelectBackgroundMeta = 493; // StrParam = page list, for example 1-2, IntParam = Metafile Handle - under page
    COMPDF_SelectforegroundMeta = 494; // StrParam = page list, for example 1-2, IntParam = Metafile Handle - over page


    Here you can apply a watermark to a group of pages.

    Julian