473,385 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

printing on two vertically attached pages does not print on the lower page

Hi,

I prepare a windows application. Now client told i print his invoices on pre-printed form. The dimension paper are 8.3 inch, 5.8 inch width & height. Now, two papers are attached to each other vertically. the upper page is office copy & lower page is customer copy. when i print to paper & make no of copies 2 then it prints onlyyon office copy page,skips customer copy page, & prints on the office copy page partof the next page. Belows my code...

Expand|Select|Wrap|Line Numbers
  1. PrinterSettings PS = new PrinterSettings();
  2.     PrintDocument PD = new PrintDocument();
  3.  
  4.     public printout()
  5.     {            
  6.         PrinterSettings.StringCollection sc = PrinterSettings.InstalledPrinters;
  7.         foreach (string str in sc)
  8.         {
  9.             cbPrinter.Items.Add(str); //Combobox from where user select printer
  10.             if (str == PS.PrinterName.ToString())
  11.             {
  12.                 cbPrinter.SelectedIndex = i;
  13.             }
  14.             i++;
  15.         }
  16.     }
  17.  
  18.     private void tsbtnPrint_Click(object sender, EventArgs e)
  19.     {
  20.         PD.DefaultPageSettings.PaperSize = new PaperSize("Custom", 827, 583);
  21.         PD.PrinterSettings.DefaultPageSettings.PaperSize = PD.DefaultPageSettings.PaperSize;
  22.         PD.PrinterSettings.Copies = Convert.ToInt16(nudCopies.Value);//take value from a numeric up down
  23.         PD.PrinterSettings.PrintRange = PrintRange.AllPages;
  24.         PD.PrintPage += new PrintPageEventHandler(PD_PrintPage);
  25.         PD.Print();
  26.     }
  27.  
  28.     private void cbPrinter_SelectedIndexChanged(object sender, EventArgs e)
  29.     {
  30.         PS.PrinterName = cbPrinter.SelectedItem.ToString();
  31.         PD.PrinterSettings = PS;
  32.     }
  33.  
How can i make print on the customer page part also...
Aug 4 '11 #1
0 1273

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Yaron Cohen | last post by:
Hi, I would like to ask for your help. I am using IE5.5. I have a wide page with horizontal scroll bar. The problem is that I get only 1 page when printing it using "file->print" or...
16
by: gb | last post by:
Hi All, Ive created a popup page using 'var openWindow = window.open("new","pop")' And added content using openWindow.document.write(" "); statements. But now I would like to be able to print...
2
by: David Cho | last post by:
My button to print a document is in one frame, but the target doc is in a different one. The button ======= <input type="submit" name="btnPrint" value="Print Application" id="btnPrint"...
4
by: Jamey Shuemaker | last post by:
I've been looking for a way to do a duplex print job without a duplex printer. I reviewed some old posts about printing odd pages and found that most of them led to KB article 101075 or an export...
4
by: Joakim Olsson | last post by:
hi i'm not to good at this stuff yet... but I hope some can help me My problem is that I want to print two pages from my program I tried to set the HasMorePages = true but it keeps posting the...
2
by: ray well | last post by:
hi, i need to print multiple pages on a printer. this is what i'm using now Sub Print() Dim PrintDoc As New PrintDocument AddHandler PrintDoc.PrintPage, AddressOf Me.PrintText Do While...
6
by: Bill | last post by:
Hi I am trying to get my listbox items to print if they stream past the one page mark. my code is working for one page of information (if the e.hasmorepages) is not there. But I am having...
1
by: fbouabcha | last post by:
Hi, My pb is to know the total pages to print, because I want to print each pages this format "page n of M". Thanks. Nass
1
by: =?Utf-8?B?UGxheWE=?= | last post by:
I am having problems when I try to print multiple pages in my print preview dialog. It will print more then one page when it needs to however, the second page is always blank when it should contain...
0
by: thirunavukarasukm | last post by:
Hai.... To print Html page using PrintDialog and Print Document i am created one windows appication.. the windows application have many pages in my booking page i have two buttons one...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.