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.
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 KokkalagaddaAssociate Software Developer
Hi,
that's perfect.
Thank you
Hansjörg Wintermantel
EDV Höhne GmbH