Einzelnen Beitrag anzeigen

Gruber_Hans_12345

Registriert seit: 14. Aug 2004
1.426 Beiträge
 
Delphi 2007 Professional
 
#50

Re: Vektor Format anzeigen/drucken

  Alt 19. Nov 2007, 07:44
so, habs nun hinbekommen, das er das ganz genau so druckt, wie es gehört ...

Delphi-Quellcode:
        bounds.X := 0;
        bounds.Y := 0;
        bounds.Width := 210;
        bounds.Height := 297;
        Printer.BeginDoc;

        Graphics := TGPGraphics.Create(Printer.Canvas.Handle);
        try
            Graphics.SetPageUnit(UnitMillimeter);
            Graphics.SetSmoothingMode(SmoothingModeAntiAlias);
            Graphics.TranslateTransform(-MarginToMM(GetDeviceCaps(Printer.Handle, PHYSICALOFFSETX), GetDeviceCaps(Printer.Handle, LOGPIXELSX)), -MarginToMM(GetDeviceCaps(Printer.Handle, PHYSICALOFFSETY), GetDeviceCaps(Printer.Handle, LOGPIXELSY)));
            SVGImage1.SVG.PaintTo(Graphics, Bounds, nil, 0);
        finally
            Graphics.Free;
        end;

        Printer.EndDoc;
danke nochmal für alles und diese extrem geniale komponente!
Gruss Hans

2B or not 2B, that is FF
  Mit Zitat antworten Zitat