Hello everybody,
Took me few days to test the suggestion sent by Cusmin Prund. Now I have
tested it and it is working! I have been able to define a custom paper
size which fitted my mailing labels and I can print a single label or
multiple labels and the printer scroll correctly, thank you Cusmin.
Well it almost working correctly..
On Windows 2000, at the end of printing, the printer (Panasonic
KX-P3200) will automatically scroll up one label height so that we can
tear the label off, that is the right behaviour. On Windows XP it
doesn't so at this stage after printing a set of labels we need to
manualy scroll the paper one label height up to tear all of them off.
Wonder if anyone have any suggestions to make it scroll automatically?
(the way it does in Windows 2000).
I am printing the labels using the following code:
procedure TPrintLabel.PrintMe;
var
f: TextFile;
i: integer;
begin
while not MyQuery.Eof do
begin
AssignPrn(f);
Rewrite(f);
for i := 0 to MyQuery.FieldCount - 1 do
if not VarIsNull(MyQuery.Fields[i]) then
WriteLn(f, MyQuery.Fields[i].AsString)
else
WriteLn(f);
System.CloseFile(f);
MyQuery.Next;
end;
end;
Cusmind Prund wrote in reply to the original message at the end of this
message:
---------------->>
Windows introduced a very interesting problem with Windows XP, and it
might have been in 2000 also. Windows somehow supervises paper sizes
requested by
application: You can only select a paper size that's allready defined
for your printer. I'm not talking about paper sizes you can select from
QReport or Word or whatever, I'm talking about paper sizes you can
request from the driver's setup page!
If you can't find your paper size in your printer's list, you'll have to
create a custom paper format for it. Open control panel, go to printers,
select you printer and click File -> Server Properties (that's File from
Explorer's menu, not from your printer's right-click menu). You'll be
able to create a new paper format.
If you can't create the required paper format because of some error,
there's an other funny problem: Your printer's INF file includes
information about the minimum and maximum paper sizes it supports.
Apparently those are VERY wrong for dot matrix printers (a dot matrix
printer should be able to print anything from a single "dot" to an
infinitley long page!). If you're affected by this you'll have to modify
the INF file that defines your printer and re-install it.
----------------->>
Shuki Shukrun wrote:
> Dear fellows,
>
> I hope my question is not off topic.. I need to print mail labels on a
> dot matrix printer (Panasonic FX-3200) from my application which is
> developed with D6 and is run on Windows 2000. The labels are 51x105mm
> I wished to set the page hight to 51mm so that I will be able to print
> a single label if needed but I didn't find how to accomplish that yet.
> I wrote a report using TQuickRep with one details band on it and set
> the height and width of it to the above and set the report page size
> to be the same but when I print the printer print the label ok but
> always scrolls up 6 labels up to what is the equivalent of an A4 page.
>
> I change the paper size on the printer driver to various sizes but
> whatever I do the printer always scroll up in groups of 6 labels. I
> wonder if anyone can help me solve this? Please.
>
> Thanks,
> Shuki
> _______________________________________________
> Delphi mailing list -> [email protected]
> http://www.elists.org/mailman/listinfo/delphi
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi