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)
Mike,
I am having same/smiliar issue with printing the document in PDF , to set the page orientation to Landscape.
I tried setting the page sizes like you mentioned above but it still doesnt appear to be working.
I also opnened a case against this CASE NUMBER / CAS-106921-Z8N4R2
Please let me know if it is possible for you to look into this.
Thanks, Venkat.
Yes, that worked perfectly, thank you very much for that one