Landscape printing

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lord.zoltar@gmail.com

    #1

    Landscape printing

    Hi, I'm trying to print a text report from an application. It works
    fine, except in landscape mode, which it seems to ignore. I have a
    function that handles the PrintPage even for the PrintDocument, and I
    even tried forcing it to print in landscape mode by adding:
    ev.PageSettings .Landscape = True
    (where ev is the parameter: ByVal ev As
    System.Drawing. Printing.PrintP ageEventArgs)
    I also tried
    printDoc.Defaul tPageSettings.L andscape = True
    (where printDoc is a PrintDocument that is going to be printed)

    But it does not print in portrait/landscape mode. I'm not sure why.
    This is kinda serious because several reports are required to be in
    landscape mode only.

    I'm using VB 2005, and the report's data source is a simple (but wide
    ;) ) text file.

  • lord.zoltar@gmail.com

    #2
    Re: Landscape printing

    I fixed the problem:

    It seems I have to set landscape mode BEFORE I set the PrintPage event
    handler, like this:
    ....
    Me.printDoc.Def aultPageSetting s.Landscape = True
    AddHandler printDoc.PrintP age, AddressOf printPage
    ....

    Well, hope this helps anyone else.

    Comment

    Working...