WPViewPDF PLUS Overlaying & SaveToFile - wrong result

  • Hi!

    i tried to overlay EMF file to PDF and save result to new PDF.
    i use code like source from Manual.

    Code
    TMetafile *pMetaFile = new TMetafile();        pMetaFile->LoadFromFile("in.emf");        TMetafileCanvas * mfc = new TMetafileCanvas(pMetaFile, 0);        mfc->StretchDraw(                          TRect(                                 0,                                 0,                                 parX,                                 parY                               ),                          pMetaFile                        );        delete mfc;        w->CommandStrEx(495, "1", pMetaFile->Handle);        w->Plus->SaveToFile("out.pdf");


    but EMF image doesn't appear in OUT.PDF, i see just black frame sized "parX : parY" on first page.
    if i draw some primitives on TMetafileCanvas object then i see this primitives (text, acrs, rectangles), but not loaded image.

    what is wrong in my actions? please help.

    PS:
    and if i try to overlay my logo without size changing (StretchDraw) then i see just black rectangle which have same size as source EMF image.

    Code
    TMetafile *pMetaFile = new TMetafile();
            pMetaFile->LoadFromFile("in.emf");
            w->CommandStrEx(495, "1", pMetaFile->Handle);
            w->Plus->SaveToFile("out.pdf");


    any suggestions?

    ---
    WBR

  • so, i found in manual next notice

    Zitat


    // New stamping feature (only text and vectors are supported. All text will be converted to curves!)

    COMPDF_StampMetafile = 495 // StrParam = page list, for example 1-2, IntParam = Metafile Handle - over page

    BUT if i send PDF result to printer instead saving to file - all is okay! then i see image stamped over PDF page.

    can i overlay image and save result to new PDF by any methods?