trying wPDF; problem with resolution

  • wPDF comrades:

    I have a simple graphic on a screen that was drawn to a TMetafile. I have a popup menu that currently allows me to send the metafile graphic to the printer. Here's the code:

    Code
    procedure TLensForm.FormPrint(aPalette: TGKSPalette; MaxIndex: Integer);var  i, Segs, Iz: Integer;  Segns: array [0..GCMaxSegments - 1] of Integer;  Mtrx: GMatr;begin  try    Printer.Orientation := poLandscape;    Printer.BeginDoc;    SetPrinterDcTransform;    SetPalette(aPalette, MaxIndex);    DrawMetafile := TMetafile.Create;    DrawCanvas := TMetafileCanvas.Create(DrawMetafile, 0);    Iz  := LensId;    Segs := SegNamesToInts (Iz, Segns);    if Segs >= MinSegments then    begin      for i := 0 to NSegments - 1 do      begin        if Segns[i] > 0 then        begin          EvaluateMatrix (GetSegRecord(i)^.DX, GetSegRecord(i)^.DY,              GetSegRecord(i)^.SclFctr,              GetSegRecord(i)^.SclFctr, Mtrx);          SetPrimitiveTransform(Mtrx);          RetrieveSegment (Segns[i]);        end;      end;    end;  finally    DrawCanvas.Free;    DrawCanvas := nil;    Printer.Canvas.Draw(0,0,DrawMetafile);    DrawMetafile.Free;    DrawMetafile := nil;    SetPalette(clScreenPalette, GCMaxColorIndex);    SetDcTransform;    Printer.EndDoc;    Printer.Orientation := poPortrait;  end;end;

    DrawCanvas is a component of an ancestor of TLensForm and the middle section of the code with the EvaluateMatrix draws the picture. When I send this to the printer I get beautiful resolution, much better than I see on the screen.

    Here's the code I've written to get a PDF file

    This gives me a file that when printed using Acrobat reader has far inferior resolution; the picture looks as it does on the screen. I've tried several different techniques, but none work. Is there any way I can achieve the same resolution in PDF that I'm getting with the direct Printer.Canvas.Draw(0, 0, DrawMetafile)?