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
600
Printing UltraChart to PDF in landscape mode
posted

I try to print an UltraChart to PDF. I'm using following code:

            Dim _AusgabePfad As String = My.Computer.FileSystem.GetTempFileName
            _AusgabePfad = Path.GetDirectoryName(_AusgabePfad) & "\" & Path.GetFileNameWithoutExtension(_AusgabePfad) & ".PDF"
            '
            Dim _Report As New Infragistics.Documents.Reports.Report.Report
            '
            _Report.Preferences.Printing.PaperOrientation = Infragistics.Documents.Reports.Report.Preferences.Printing.PaperOrientation.Landscape
            _Report.Preferences.Printing.PaperSize = Infragistics.Documents.Reports.Report.Preferences.Printing.PaperSize.A4
            _Report.Preferences.Printing.FitToMargins = True
            '
            ucPGM.RenderPdfFriendlyGraphics(_Report.AddSection().AddCanvas().CreateGraphics())
            _Report.Publish(_AusgabePfad, Infragistics.Documents.Reports.Report.FileFormat.PDF)
            '
            Process.Start(_AusgabePfad)

PDF ist shown, but orientation is portrait. Where is my error?

Thanks.

Parents
  • 6120
    Verified Answer
    Offline posted

    Hello, 

    When publishing a report to set its Orientation, you have use its PageOrientation property. By setting the PaperOrientation while printing you are setting the orientation for printing the document.

    To achieve this you can write something like below: 

    Report report = new Report();

    ISection section = report.AddSection();

    ----

    section.PageOrientation = PageOrientation.Landscape; 

    Please let me know if I may be of further assistance. 

    Sincerely,
    Sahaja Kokkalagadda
    Associate Software Developer

Reply Children
No Data