TWPPDFPrinter cannot read emf plus records

  • Our ClickForms documents includes sometimes EMF plus images.
    We display and print them using Windows gdiplus.dll
    When we try create PDF of document with EMF plus images output looks ugly, for example dotted lines are are rendered as thick solid lines. It looks TWPPDFPrinter ignores EMF plus records.

    HERE is the code:
    WPDFPrinter.StartDoc
    dcResolX := GetDeviceCaps(WPPDFPrinter.ReferenceDC, LOGPIXELSX);
    dcResolY := GetDeviceCaps(WPPDFPrinter.ReferenceDC, LOGPIXELSY);
    WPPDFPrinter.StartPage(pageWidth,pageHeight, dcResolX, dcResolY, 0);
    PlayEnhancedMetafile(metaFileStream,WPPDFPrinter.Canvas.Handle,pageRect);
    WPPDFPrinter.EndPage;
    WPPDFPrinter.EndDoc;

    procedure PlayEnhancedMetafile(strm: TStream; DC: HDC; rDest: TRect);
    var
    Token: Integer;
    StartupInput: TGdiplusStartupInput;
    Graphics: Integer;
    Image: Integer;
    iStrm: IStream;
    begin
    StartupInput.GdiplusVersion := 1;
    StartupInput.DebugEventCallback := 0;
    StartupInput.SuppressBackgroundThread := 0;
    StartupInput.SuppressExternalCodecs := 0;
    istrm := TstreamAdapter.Create(strm,soReference);
    if GdiplusStartup(Token, @StartupInput, 0) = 0 then
    try
    if GdipCreateFromHDC(DC, Graphics) = 0 then
    if GdipLoadImageFromStream(istrm,Image) = 0 then
    try
    GdipSetPageUnit(Graphics,2); //unitPixel = 2;
    GdipDrawImageRect(Graphics, Image, rDest.Left, rDest.Top, rDest.Right - rDest.Left, rDest.Bottom - rDest.Top);
    finally
    GdipDeleteGraphics(Graphics);
    end;
    finally
    GdiplusShutdown(Token);
    end;
    end;

    Is there way to make TWPPDFPrinter to read EMF plus records?
    Thank you
    Yakov