How would I specify printing region, from 300x500 to A4 sizing.

gho5t

Member
Joined
Aug 26, 2013
Messages
13
Programming Experience
1-3
Hey guys, please ignore my most recent post as I have solved how to set my orientation to landscape.

I was wondering if there was a way to specify how big the region of printing is for example the print preview shows that it will print half the overall size,
when I wish to print the full landscape A4 Page.

GFVaEgV.png


Here is my code:
Public Class cutting

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click


PrintForm1.PrinterSettings.DefaultPageSettings.Landscape = True


PrintForm1.Form = Me
PrintForm1.Print()


End Sub


End Class

Thank-you so much for the help.
It's been a while since iv'e coded vb.net!
 
On the PrintDocument, in the PrintPage event you have the e argument that has lots of information about the size of the page and everything, check out e.PageBounds and e.MarginBounds
 
Back
Top