Quantcast
Channel: CSharp Forum Latest Questions
Viewing all articles
Browse latest Browse all 32060

print two images on single page c#

$
0
0
I want to print two images on single page. I have tried below code, but it is printing all images on different pages.

publicvoid PD_PrintPage(object sender,PrintPageEventArgs e){float W = e.MarginBounds.Width;float H = e.MarginBounds.Height;for(;FileCounter>=0;FileCounter--){try{BitmapBmp=newBitmap(BmpFiles[FileCounter]);if(Bmp.Width/ W <Bmp.Height/ H)

                    W =Bmp.Width* H /Bmp.Height;else
                    H =Bmp.Height* W /Bmp.Width;

                e.Graphics.DrawImage(Bmp,0,0, W, H);break;}catch{}}FileCounter-=1;if(FileCounter>0){

            e.HasMorePages=true;}else{FileCounter=BmpFiles.Length-1;}}

this will print all images in different page

I want some functionality that will print one image ,leave some space and again prine other image in same page if space is remaining.


Viewing all articles
Browse latest Browse all 32060

Trending Articles