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.
Hello Venkata,
In the mentioned case we have provide you a sample code, also I have captured a video with my phone how I am running the sample with Infragistics 12.2 and how the document is printing correctly on a real physical printer. So if you use the sample which I had sent you with Infragistics 12.2 everything works. Please let me know how to convince you that the sample works with Infragistics 12.2. Am I understood your issue correct? Please watch the video at the following fink:
http://www.youtube.com/watch?v=e0v577_9aog&feature=youtu.be
Please let me know if you have any further questions.