Hi
The following code is not printing my PDF document in landscape. Can you have a look at it please. I'm using Windows Forms Version 20092.1003
Are there any known issues?
Thanks,
Dave
Dim myimage As Image = Bitmap.FromFile("C:\Users\myuser\AppData\Local\Temp\201121541286.jpg")
Dim report As Infragistics.Documents.Report.Report
report =
New Report()
report.Preferences.Printing.PaperSize = Infragistics.Documents.Report.Preferences.Printing.PaperSize.A4
report.Preferences.Printing.PaperOrientation = Infragistics.Documents.Report.Preferences.Printing.PaperOrientation.Landscape
report.Preferences.Printing.FitToMargins =
True
section1.PageOrientation = Infragistics.Documents.Report.Preferences.Printing.PaperOrientation.Landscape
section1.AddQuickImage(
New Infragistics.Documents.Graphics.Image(myimage)).Stretch = True
section1.PageMargins.All = 50
report.Publish(
"C:\TestPDF.pdf", Infragistics.Documents.Report.FileFormat.PDF)
Hi,
I did a little research and it looks like all of the Preferences.Printing and section.PageXXX properties only apply to the report.Print method. They have no effect on the document itself.
A PDF document doesn't have any concept of page orientation - this is only determined during a print operation.
So I think what you would have to do is set the size of the page and reverse the width and height. For example:
section1.PageSize = New PageSize(Infragistics.Documents.Report.PageSizes.A4.Height, Infragistics.Documents.Report.PageSizes.A4.Width)
Yes, that worked perfectly, thank you very much for that one
Don't work
Where is Section1?
--
Ok i found here: http://help.infragistics.com/Help/NetAdvantage/WinForms/2012.1/CLR2.0/html/Chart_Exporting_Numerous_Charts_to_a_PDF.html