How to set page orientation for a PDF document?
(Views :1798)

The PageOrientation property of IPDFPage is used to assign the orientation type for a PDF Document. The orientation types supported are,

  • Portrait
  • Landscape
  • C#
    //Setting Orientation of PDF page in Landscape mode.
    pdfDoc.LastPage.Orientation = PageOrientation.Landscape;
    //Setting Orientation of PDF page in Portrait mode.
    pdfDoc.LastPage.Orientation = PageOrientation.Portrait;
    VB
    'Setting Orientation of PDF page in Landscape mode.
    pdfDoc.LastPage.Orientation = PageOrientation.Landscape
    'Setting Orientation of PDF page in Portrait mode.
    pdfDoc.LastPage.Orientation = PageOrientation.Portrait

    Sample:

    http://websamples.syncfusion.com/samples/KB/PDF.Windows/PPOrientation/main.htm

    Note:

    This will work only with PDF.Legacy.Base

    ::adCenter::