Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
Page orientation

I am trying to generate pdf document with page oriention set to landscape but it not having any effect

Dim Document As New Report()

Dim PDFSection As Infragistics.Documents.Report.Section.ISection = Document.AddSection()

PDFSection.PageOrientation = Infragistics.Documents.Report.PageOrientation.Landscape

' other code goes here


 Is ther any code sample that you can point me to?


Devinder Singh

  • 37774

    Are you sure that the section is not rendered in landscape?  If you go to the properties of the PDF, does it list the page size as wider than it is tall?  I did a quick test in a project I had open that worked correctly; the code I used was:

    Report report = new Report();
    ISection section = report.AddSection();
    section.PageOrientation = PageOrientation.Landscape;
    section.PageBorders = new Borders(Infragistics.Documents.Graphics.Pens.AliceBlue);
    section.PageMargins.All = 25;
    section.AddText().AddContent("This is some text");
    report.Publish("Test.pdf", FileFormat.PDF);

    It's in C# since I already had the solution open, but as you can see I wasn't doing very much with my report, and when I checked the properties of the document, it listed the page size as 11.0 x 8.5.