473,799 Members | 2,723 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

multipage print trouble... T.T

Hello,
I am going to print paper of 15 X 4 Inch.
It's a continuous form.
But When I Print Multiple Paper, Printer does'nt print back to back.
If I am goint to print 3 pages.
Jump over 3~4(paper)Pages with empty after print 1page.
And print second page on fifth paper.
But it work's correctly in PrintPreviewDia log.

I don't know the reson.
please, see that source code.
//below contents..

const int DPI = 96;
private int iNumberPages = 0;
private int currentPage = 0;

private void print()
{
PrintDocument prndoc = new PrintDocument() ;
PrintDialog pdlg = new PrintDialog();
prndoc.PrintPag e += new PrintPageEventH andler(OnPrintP *age);
prndoc.QueryPag eSettings += new
QueryPageSettin gsEventHandler( *OnQueryPageSet tings);
pdlg.PrinterSet tings = prndoc.PrinterS ettings;
if(pdlg.ShowDia log() != DialogResult.OK )
return;
prndoc.PrinterS ettings.Printer *Name =
pdlg.PrinterSet tings.PrinterNa *me;
currentPage = 0; //member Variable
iNumberPages = 3; //All of Page Number... member variable
prndoc.Print();

}
private void OnQueryPageSett ings(Object obj, QueryPageSettin gsEventArgs

qpsea)
{

int pagewidth = 380, pageheight=89; //millimeter
float pwf = 0f, phf = 0f;
pwf = pagewidth /25.4F;
phf = pagewidth /25.4F;
// DPI was member variable.. 96 because my monitor is 96 DPI
pwf *= DPI;
phf *= DPI;
qpsea.PageSetti ngs.PaperSize = new PaperSize("Giro ", (int)pwf,
(int)phf);
qpsea.PageSetti ngs.Margins = new Margins(0, 0, 0, 0);

}
private void OnPrintPage(Obj ect obj, PrintPageEventA rgs ev)
{

Graphics g = ev.Graphics;
g.PageUnit = GraphicsUnit.Mi llimeter;
// contents to print...
currentPage++;
ev.HasMorePages = currentPage < iNumberPages;

}

Nov 17 '05 #1
0 1463

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2424
by: news.microsoft.com | last post by:
Hello group, My goal is to attach an image over another image. Top image should be transparent so the back image is visible through the top one. Bellow is a test code in VB.NET. You need to create a form, a button (Button1) and an Picture Box (picBox). "watermark.jpg" is any jpg image, "beispiel.tif" is a multipage TIFF image with the white background, which will turn to transparent. The most important thing here is that the TIFF image...
0
1487
by: Nigel | last post by:
The Visual Basic .NET Step by Step book has the following code and text: Imports System.Drawing.Printing Private Sub PrintText(ByVal sender As Object, ByVal ev As PrintPageEventArgs) ev.Graphics.DrawString(TextBox1.Text, New Font("Arial", 11, FontStyle.Regular), Brushes.Black, 120, 120) ev.HasMorePages = False End Sub
1
1550
by: szabelin | last post by:
Is it possible to dynamically add a PageView to MultiPage? TabStrip has items property, so Tab and TabSeparator can be added... how about adding PageView to MultiPage? If not possible please recommend another client-side tab control. Thank you
1
2244
by: Dan | last post by:
IE WebControls Tab/MultiPage state problem I have a IE tab/multipage on a WebForm (aspx) like this: <code> <iewc:TabStrip id="tabs" runat="server" TargetID="MultiPage1"> <iewc:Tab Text="Tab1" ID="tp Tab1"></iewc:Tab>
1
1188
by: sukanya s via .NET 247 | last post by:
(Type your message here) -------------------------------- From: sukanya s I have controls within a Multipage Web Control. I want to validate the Conrols within the Multipage control using Javascript validation. How do i accomplish this. Please help me. Also please let me know how do I print selected items from a web page. I have several items in a web page. I need to print only the companylogo, companyname and a datagrid.
2
2544
by: Child | last post by:
I have a page which has a tabbstrip and a multipage. The tab strip works great, and navigates the multipage no problem. However, I have a situation where I would like to have a "hidden" multipage thats not navigated to via the tabstrip and I am running into trouble. i see that supposedly I can do this with multipage.selectedindex = myindex but that doesnt' appear to work for me. I was wondering if I could use both the tabstrip and...
0
951
by: John | last post by:
This is in reference to Internet Explorer WebControls that can be located at the following link: http://msdn.microsoft.com/library/default.asp?url=/workshop/webcontrols/overview/overview.asp On the above link, I click on the "Tour of the WebControls". I would scroll down to the section: TabStrip and MultiPage Then I would click on the "Show Me" button for the demo. When I click on different tabs and do "Print Preview" or even...
1
1548
by: GW | last post by:
Trying to force a new page when required using e.HasMorePages = True but not having much luck. All prints OK except for trying to figure out how to do a page feed without exiting the loop. There is a lot of data gathering from DB in each loop so exiting the loop is not an option. All the examples for multipage printing I found so far are based on printing
1
2209
by: Randy Koeller | last post by:
Hello Have looked all over google for this Answer but I can't find it. Ma bey you all can help me? I have a multipage form with 3 tabs. I would like to know if there is anyway to print all 3 tabs at one time, without hitting every tab then hitting print? Thanks.
0
9543
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10488
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10257
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7567
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
6808
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
5588
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4144
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
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
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.