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
295
Page orientation
posted

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

Document.Publish(FilePath,FileFormat.PDF).

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

Regards

Devinder Singh

Parents
No Data
Reply
  • 37774
    posted

    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);
    Process.Start("Test.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.

    -Matt 

Children
No Data