Printdocument (PDF) in horizontal VB

Asked

Viewed 50 times

0

I have a printDocument that makes mine PDF with the sheet upright (standing) I would like to leave the sheet horizontal (lying down).

My code I use to generate the PDF:

Dim ppd As New PrintPreviewDialog
    ppd.WindowState = FormWindowState.Maximized
    ppd.Document = PrintDocument1
    ppd.ShowDialog()

Does anyone have any idea how I leave the sheet horizontal?

1 answer

0


That was the missing code

PrintDocument1.DefaultPageSettings.Landscape = True

Now the sheet is horizontal

Browser other questions tagged

You are not signed in. Login or sign up in order to post.