Receipt printers and endless paper reel
Receipt printers and endless paper reel
Hi
Just to summarize all the thoughts mentioned above:
Assume that the report template has only one page in the Designer.
So to print the report on reel paper you need to specify the papersource, paperkind, and page size
report.Pages[0].PaperSize = System.Drawing.Printing.PaperKind.Custom;
report.Pages[0].PaperSourceFirstPage = System.Drawing.Printing.PaperSourceKind.Custom;
report.Pages[0].PaperSourceOtherPages = System.Drawing.Printing.PaperSourceKind.Custom;
report.Pages[0].Height = your height of one page;
report.Pages[0].Width = your width of one page;
report.Render();
report.Print();
But there is no one universal rule for all printers, for example let's take a simple printer Canon Pixma-4600:
PaperSourceKind for this printer contains five different values. One from them is 'Automatic' and others are Custom.
So the settings of the printer contain PapersSource structure and only inner part of that structure has a PaperSourceKind type.
So not always possible to specify a PaperSource parameter of the Page in the report explicitly.
In such cases all we can do is to use a PrintDialog standard windows dialogue for setting of the printer parameters.
We constantly receive Emails from our customers with confirmation of the fact that some printer drivers require specifying in their properties of exactly the same format name from their inner list. If the paper format was not from the printer's inner list then the default format will be used instead. And the same situation with a PaperSource parameter.
Sometimes if a PaperKind was set correctly, but the PaperSource was not set properly, all print settings could be reset in their default value.
Thank you.
Just to summarize all the thoughts mentioned above:
Assume that the report template has only one page in the Designer.
So to print the report on reel paper you need to specify the papersource, paperkind, and page size
report.Pages[0].PaperSize = System.Drawing.Printing.PaperKind.Custom;
report.Pages[0].PaperSourceFirstPage = System.Drawing.Printing.PaperSourceKind.Custom;
report.Pages[0].PaperSourceOtherPages = System.Drawing.Printing.PaperSourceKind.Custom;
report.Pages[0].Height = your height of one page;
report.Pages[0].Width = your width of one page;
report.Render();
report.Print();
But there is no one universal rule for all printers, for example let's take a simple printer Canon Pixma-4600:
PaperSourceKind for this printer contains five different values. One from them is 'Automatic' and others are Custom.
So the settings of the printer contain PapersSource structure and only inner part of that structure has a PaperSourceKind type.
So not always possible to specify a PaperSource parameter of the Page in the report explicitly.
In such cases all we can do is to use a PrintDialog standard windows dialogue for setting of the printer parameters.
We constantly receive Emails from our customers with confirmation of the fact that some printer drivers require specifying in their properties of exactly the same format name from their inner list. If the paper format was not from the printer's inner list then the default format will be used instead. And the same situation with a PaperSource parameter.
Sometimes if a PaperKind was set correctly, but the PaperSource was not set properly, all print settings could be reset in their default value.
Thank you.
Re: Receipt printers and endless paper reel
Hi,
How could I do the same thing for an excel spreadsheet i have, I dont wish for it to consider page breaks.
Thank you
Deon
How could I do the same thing for an excel spreadsheet i have, I dont wish for it to consider page breaks.
Thank you
Deon
Re: Receipt printers and endless paper reel
Hello, Deon.
Which our component do you use?
Which version?
How do you export report?
Thank you.
Could you describe your issue more detailed.onlylion wrote:How could I do the same thing for an excel spreadsheet i have, I dont wish for it to consider page breaks.
Which our component do you use?
Which version?
How do you export report?
Thank you.
Re: Receipt printers and endless paper reel
Back on this subject again after 8 years.
Still having problems printing to Epson TV88IV receipt printer. Cuts off after 12 1/8 inches no matter where it is in the report generation. Could be in the detail, the footer or wherever 12 1/8" happen to be. Shorter reports work properly.
Have set the PaperSize, PaperSourceFirstPage and PaperSourceOtherPages to custom. PageWidth to 80 and PageHeight to 32000.
Help. Thank you.
Still having problems printing to Epson TV88IV receipt printer. Cuts off after 12 1/8 inches no matter where it is in the report generation. Could be in the detail, the footer or wherever 12 1/8" happen to be. Shorter reports work properly.
Have set the PaperSize, PaperSourceFirstPage and PaperSourceOtherPages to custom. PageWidth to 80 and PageHeight to 32000.
Help. Thank you.
Re: Receipt printers and endless paper reel
Hello,
Please try to check the printer settings.
In the printer settings, there is the maximum length of paper to trim.
Thank you.
Please try to check the printer settings.
In the printer settings, there is the maximum length of paper to trim.
Thank you.
-
- Posts: 15
- Joined: Fri Jan 20, 2012 9:06 am
- Location: Brasil
Re: Receipt printers and endless paper reel
You can dynamically set the height of the page, depending on the amount of data on a page.
First set the page size to Custom, then write the following script in the EndRender event of report:
First set the page size to Custom, then write the following script in the EndRender event of report:
Code: Select all
foreach (StiPage page in this.RenderedPages)
{
double max = 0;
foreach (StiComponent comp in page.GetComponents())
{
if (comp.Bottom > max) max = comp.Bottom;
}
page.PageHeight = max + page.Margins.Top + page.Margins.Bottom;
}
Re: Receipt printers and endless paper reel
Hello,
Thank you for your solution.
Thank you for your solution.