Problems with custom paper size on a dot matrix printer
Hi,
I have a report with custom paper size. When I print this report on a dot
matrix printer using continuous paper, the printer start to print on each to
page few milimeters above than last page and how the paper has delimited
fields, from 3rd page ahead the values are printed out of the fields. What
can I do to solve this problem?? I'm using Delphi 7, RB 10.02, WinXP,
Printer Epson LQ-570 ESC/P 2.
Thanks,
--
Weverton Gomes de Morais
Desenvolvedor
Goi?nia/GO
I have a report with custom paper size. When I print this report on a dot
matrix printer using continuous paper, the printer start to print on each to
page few milimeters above than last page and how the paper has delimited
fields, from 3rd page ahead the values are printed out of the fields. What
can I do to solve this problem?? I'm using Delphi 7, RB 10.02, WinXP,
Printer Epson LQ-570 ESC/P 2.
Thanks,
--
Weverton Gomes de Morais
Desenvolvedor
Goi?nia/GO
This discussion has been closed.
Comments
My guess is that this is occuring when the page tries to break. Take a look
at the following article on printing to continuous paper.
----------------------------------------------------
Article: Printing to Continuous Paper
----------------------------------------------------
1. Layout
For continuous printing (for example a receipt) use Title/Summary and
removing the Header/Footer. Set the PrintHeight of each to phDynamic. Layout
the DetailBand to print a single line item. Set the margins to 0 or to the
smallest that the printer driver will support (some printers have an
unprintable area).
With this configuration The Report will generate a Title followed by a
variable number of Detail bands that span pages if needed, and then finally
print a Summary at the end.
2. Pagination
a. dtPrinter
Some printer drivers have a continuous paper size setting. If not then try
setting the paper size to be very small - perhaps the size of the tallest
band in the layout. Or try setting the page height to be the size of a
detail band. Note that some printer drivers will only accept page sizes
within a certain range of paper sizes.
b. dtReportTextFile
With the above layout, the report text file will generate the page breaks
properly, however the device will fill up a page with blank lines. You can
control the number of lines per page by configuring the CharacterGrid
property in the Report.BeforePrint event:
example:
procedure TForm1.ppReport1BeforePrint(Sender: TObject);
var
lDevice: TppReportTextFileDevice;
begin
if (ppReport1.FileDevice <> nil) and (ppReport1.FileDevice is
TppReportTextFileDevice)then
begin
lDevice := TppReportTextFileDevice(ppReport1.FileDevice);
{120 characters per line, 66 lines per page}
lDevice.CharacterGrid(120, 66);
end;
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
First, tanks by answear. Well, today my report layout has only a DetailBand
that fills all report space. Do you think I can solve my problem using this
layout??
Thanks,
--
Weverton Gomes de Morais
Desenvolvedor
Goi?nia/GO
Yes, using a small sized detail band with a small sized custom paper should
allow you to print to continuous paper correctly.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com