473,664 Members | 3,066 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

1 New Member
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 1283

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

Similar topics

2
8365
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 "window.print".
16
10416
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 this page? openWindow.document.write("<a href='#' onClick='self.close()'>Close<\/a><\/p>")
2
1858
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" class="Buttons" onClick="javascript:top.main.window.print();return false;" /> The frame page
4
5869
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 of the document to Word for duplexing there. I was looking for a VBA method for doing this, so the KB article is right out and when you export to Word, some of the report's text boxes wind up truncated because of some sort of sizing difficulty...
4
4760
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 same stuff on the two pages, or sometimes the second page over the first page my code looks like this int i = 0
2
8186
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 bPrintingNotDone PrintDoc.Print()
6
482
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 trouble getting it to print on multiple pages. The second page will not print at all. Thanks in advance
1
1431
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
2170
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 text. Does anyone know a site with good examples I can follow or has anyone ever had this problem and know how to fix it?
0
2365
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 btnprint,btnclose
0
8437
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8549
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8636
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7375
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6187
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5660
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4185
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2764
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1759
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.