More scaling and extent issues in PdfSharp.
As per the example code we create a drawing area and then use the extent helper to create a new extent based on out original maps extent and the new drawing area. however the extent returned is the same as the original map extent!
Please see my code below
PdfGeoCanvas pdfGeoCanvas = new PdfGeoCanvas();
pdfGeoCanvas.DrawingArea = new System.Drawing.Rectangle( (int)_Margin + 10, (int)_Margin + 10, (int)(page.Width.Point - (2 * _Margin) - _LandscapeMargin) - 10 - 10, (int)(page.Height.Point - (2 * _Margin) - 10 - 10));
RectangleShape extent = ExtentHelper.GetDrawingExtent(map.CurrentExtent, pdfGeoCanvas.DrawingArea.Width, pdfGeoCanvas.DrawingArea.Height);
Map.CurrentExtent and extent always return the same value. This is problematic as I'm busy creating cordinate outputs on my print and they are scaled based on the original scale of my map and not what the new extent should be.