Autor Beitrag
CRP
Hält's aus hier
Beiträge: 7



BeitragVerfasst: Mo 02.09.02 00:20 
Hi,
ich hab ein komisches Problem. Eigentlich sollte mit dem unteren Code gedruckt werden. Bei mir macht er das aber nicht. Ich hab schon ne Menge versucht, einmal hat er von 3 Bildern eins gedruckt.

Jemand eine Idee woran das liegen kann. Ich bin am verzweifeln ;)

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
procedure TForm1.Button1Click(Sender: TObject);
var
bmp: TBitmap;
begin
  bmp := TBitmap.Create;
  try
  if OpenPictureDialog1.Execute then
    bmp.LoadFromFile(OpenPictureDialog1.FileName);
  Printer.BeginDoc;
  Printer.Canvas.Draw(x, y, bmp);
  Printer.EndDoc;
  finally
  bmp.Free;
  end;
end;


Ich bin wirklich für jede Hilfe dankbar.
MfG
Eisenherz
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Mo 02.09.02 14:53 
Geh auf diese Seite und schau Dir den Abschnitt "Printing Bitmaps" an.

_________________
aloa Eisenherz
CRP Threadstarter
Hält's aus hier
Beiträge: 7



BeitragVerfasst: Di 03.09.02 14:01 
Hi,
DANKE, aber das war nicht ganz meine Frage, ich wollte nicht wissen wie man druckt, sondern warum er nicht druckt. Hab schon mehrere Bsp. getestet. Genauso geht das Printer.Title nich bei mir.

Naja is auch nicht so wichtig, hab das jetzt anders gelöst.

MfG
Eisenherz
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Di 03.09.02 18:01 
Du findest auf der verlinkten Seite u.a. folgenden Text:
Zitat:
Which VCL methods can I use while printing images? Any the VCL methods for drawing raster images should never be used to a printer. Problems are caused by sending a bitmap based on another device to the printer (and you should never do that). Joe Hecht pioneered the workaround for this problem at driver level. Some drivers are now able to detect this error and work around it, but you cannot rely on all drivers to do this. The damage that can be done includes bringing down the entire NT system! [Thanks to Joe Hecht for E-mailing me this information. 19 Jan 99]


Wenn Du es genauer wissen willst, dann musst Du selber suchen.

Dass Printer.Title nicht funktioniert höre ich das erste mal. Dass das nicht gedruckt wird, sondern nur im Druckmanager angezeigt wird, ist Dir wahrscheinlich schon klar.

_________________
aloa Eisenherz