Free Support Forum - aspose.com

Print PDF in Landscape mode using Aspose.PDF for .NET

I tried printing landscape with the latest version but it is coming out in portrait mode. Here is the code I use:

    viewer.AutoResize = True 'Print the file with adjusted size
    'viewer.AutoRotate = psc.AutoOrientation 'Print the file with adjusted rotation
    If Not viewer.AutoRotate Then
        Select Case psc.PageSettings.PaperOrientation
            Case EnmOrientation.Landscape
                pgs.PrinterSettings.DefaultPageSettings.Landscape = True
            Case EnmOrientation.Portrait
                pgs.PrinterSettings.DefaultPageSettings.Landscape = False
        End Select
    End If

@webmaster6b8e5,

Thanks for contacting support.

Can you please share source file along with generated result so that we may help you out.

VisualCron-invoice29923 (1).pdf (86.8 KB)

All pdfs. Including this.

@webmaster6b8e5,

I have observed your comments. Can you please visit this thread link. This will hopefully resolve your issue. Please share feedback with us if there is still.

It says I do not have access to that topic.

@webmaster6b8e5,

Can you please check now.

I do not see which code in that example should resolve my issue?

I tested adding the papersize code but it did not make things better.

@webmaster6b8e5,

I have observed your comments and have logged it as PDFNET-47764 in our issue tracking system. We will further look into details of the issue and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.