Autor Beitrag
Conny Drexler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44


D6 prof. win xp
BeitragVerfasst: Di 08.07.03 21:45 
Hallo Leute,

ich habe neurerdings einen Lexmark Drucker , der über die USB Schnittstelle angesteuert wird. Leider brigne ich einfach keine Daten zu diesem blöden Ding. Dei Ausgabe auf einen par. Drucker (LPT1 oder 2) funktioniert einwandfrei. Ich benutze TPrinter usw. Hat jemand eine Idee????
Conny
AndyB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1173
Erhaltene Danke: 14


RAD Studio XE2
BeitragVerfasst: Di 08.07.03 22:25 
Kannst du von einem anderen Programm auf diesem drucken? TPrinter ist es eigentlich egal auf was es druckt. Das entscheidende ist der Druckertreiber, der die Kommunikation zwischen Windows und dem Drucker regelt.

Druckst du vielleicht Bilder, die nicht erscheinen? StretchDraw/Draw bzw. StretchBlt/BitBlt sind nicht für Drucker geeignet und funktionieren nur, wenn der Treiberhersteller sich die mühe gemacht hat, diese zu simulieren, was nur ungefähr 10% machen. StretchDIBits ist zum Drucken die eindeutig bessere Funktion, benötigt aber mehr Programmierarbeit.

_________________
Ist Zeit wirklich Geld?
Conny Drexler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44


D6 prof. win xp
BeitragVerfasst: Mi 09.07.03 14:43 
Aus anderen Programmen kann ich einwandfrei drucken. z.B. Word usw. Keinerlei Probleme. Der Druckertreiber muß aber in Ordnung sein. Keine Ahnung an was es liegt.
AndyB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1173
Erhaltene Danke: 14


RAD Studio XE2
BeitragVerfasst: Mi 09.07.03 14:47 
Zeig mal ein kleines Programm (Ausschnitt des Druckfunktion), das nicht drucken kann.

_________________
Ist Zeit wirklich Geld?
Conny Drexler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44


D6 prof. win xp
BeitragVerfasst: Mi 09.07.03 15:06 
Nachfolgend der Programmcode:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
procedure Rechnungskopf;
Begin
  with printer.canvas do
    Begin
      font.Name := 'Arial';
      font.Height := 10 * 10;
      font.Style := [fsbold];
      printer.Canvas.TextOut(lrand * 10 + 17 * 10,vertdruckpos,'B E T Z');
      dec(vertdruckpos,110);

      font.Name := 'Arial';
      font.Height := 5 * 10;
      font.Style := [];
      printer.Canvas.TextOut(lrand * 10 + 5 * 10,vertdruckpos,'Schreibwaren - Bürobedarf');
      dec(vertdruckpos,50);

      font.Height := 4 * 10;
      font.Style := [];
      printer.Canvas.TextOut(lrand * 10,vertdruckpos,'Äuß. Sulzbacher Str. 16-90489 Nürnberg');
      dec(vertdruckpos,40);
      printer.Canvas.TextOut(lrand * 10 + 5 * 10,vertdruckpos,'Pirckheimerstr. 133 - 90409 Nürnberg');
      dec(vertdruckpos,40);

      printer.Canvas.TextOut(lrand * 10,vertdruckpos,'Tel.: 0911 / 5 97 16 87 - Fax: 5 97 16 88');
      dec(vertdruckpos,40);
      printer.Canvas.TextOut(lrand * 10,vertdruckpos,'Tel.: 0911 / 5 97 16 85 - Fax: 5 97 16 86');
      dec(vertdruckpos,80);
    end;

end;


Danke für die Hilfe
AndyB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1173
Erhaltene Danke: 14


RAD Studio XE2
BeitragVerfasst: Mi 09.07.03 15:11 
Eine Fehler kann ich da zumindest nicht erkennen.
Was ich da herauslesen kann ist, dass du SetMapMode irgendwo aufrufst. Dieses sollte nach NewPage wiederholt aufgerufen werden (Win9x hat sonst Probleme).


Ist Printer.PrinterIndex auch richtig gesetzt?

_________________
Ist Zeit wirklich Geld?