We have Infragistics 2009 v2. Old I know, but we are upgrading soon.
I am using the Infragistics.Documents.Reporting. I have looked through the knowledge base and haven't seen any bug fixes listed for this so I thought I would post it.
Consider the following Code
Report rpt = new Report(); Infragistics.Documents.Report.Section.ISection section = rpt.AddSection(); section.PageSize = Infragistics.Documents.Report.PageSizes.Letter; Infragistics.Documents.Report.ISite site = section.AddSite(); Infragistics.Documents.Report.ICanvas canvas = site.AddCanvas(0F, 0F); Graphics gpx = canvas.CreateGraphics(); gpx.PageUnit = GraphicsUnit.Pixel;
At this point if you check gpx.DpiX and Y they are both 96. PageSize is Letter. I would think that the canvas then should be 96 * 8.5 = 816 pixels across. This is not the case. Using the following code to draw a few lines (the pens are colored and 1 pixel wide).
gpx.DrawLine(pRed, new Point(610, 0), new Point(610, 100)); gpx.DrawLine(pGreen, new Point(611, 0), new Point(611, 100)) gpx.DrawLine(pBlue, new Point(612,0), new Point(612, 100)); gpx.DrawLine(pBlack, new Point(620, 0), new Point(620, 100));
rpt.Publish(@"C:\InfraReport_PDF.pdf",FileFormat.PDF);
On the resulting PDF I can just make out the Green line at 611 and if I zoom in I can see what appears to be 1/2 the Blue line. I would have thought that 816 would have been the right hand boundary since I created the canvas at 0,0. I can easily put a mark at 1,1.
What am I missing? Is this a bug, or just a lack of understanding?
Hi,
I try to reproduce your issue using our latest version 12.1.20121.2008, but I think that everything works properly. Could you please take a look at the attached video file and screenshot and let me know if you think that I didn`t reproduce your scenario or if you have any questions.
Regards
Thanks for taking the time to look into this.
In the video you chose a paper size of Ledger which is 11x17.
My issue was that I was choosing Legal (8.5x11). The canvas showed 96dpi, which means that it should be 816 wide. However, I am finding that it is only about 611 wide.
It appears that there is some sort of scaling going on. Also, I would like the canvas to be higher dpi then 96 but am not seeing how to do that either.
Any thoughts?