Click here to Skip to main content
15,888,286 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi dear sir
i have done my project which is a offline application in this application i just can add on print page only one page
but i want to print some things in one more page
can you help me sir for solving such problem

What I have tried:

namespace afghan_global_insurance_travel_insurance
{
public partial class Form1 : Form
{

public Form1()
{
InitializeComponent();
}



private void button4_Click(object sender, EventArgs e)
{
AGIprintPreviewDialog.Document = AGIprintDocument;
AGIprintPreviewDialog.ShowDialog();

}

private void AGIprintDocument_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{




//Bitmap bmp = Properties.Resources.l2;
//Image newimage = bmp;
//e.Graphics.DrawImage(newimage, 50, 5);
Bitmap bmp1 = Properties.Resources.l1;
Image newimage1 = bmp1;
e.Graphics.DrawImage(newimage1, 690, 5);


//
e.Graphics.DrawString("NAME", new Font("Arial", 8, FontStyle.Bold), Brushes.Black, new Point(40, 970)); //NAME
e.Graphics.DrawString("ISSUE DATE", new Font("Arial", 8, FontStyle.Bold), Brushes.Black, new Point(300, 970)); //ISSUE DATE.NOW
e.Graphics.DrawString("SIGNATURE", new Font("Arial", 8, FontStyle.Bold), Brushes.Black, new Point(685, 970)); //SIGNATURE AREA
//
e.Graphics.DrawString(textBox18.Text, new Font("Arial", 8, FontStyle.Regular), Brushes.Black, new Point(40, 998));
e.Graphics.DrawString(""+ DateTime.Now, new Font("Arial", 8, FontStyle.Regular), Brushes.Black, new Point(310,998 ));


}

private void button2_Click(object sender, EventArgs e)
{
AGIprintDocument.Print();

}


}
}
Posted
Updated 17-Dec-17 2:56am
v2
Comments
________________ 17-Dec-17 7:06am    
If you can print one page, probably you can print many pages...

But it seems you should generate the pages dynamically from code, then send it ti printer one-by one...

 
Share this answer
 
No one is going to try and read through all those pages of your unformatted code dump, to see what you are trying to do.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900