Hi,
I found a problem with PrinterGeoCanvas when I trying to print layer with DefaultTextStyle assigned (Map Suite Desktop Full Edition 4.5.32.0).
I added a shape file feature layer to my project, and when I was drawing on PrinterGeoCanvas then ArgumentException was thrown:
"Parametr jest nieprawidłowy.
w System.Drawing.Graphics.RotateTransform(Single angle, MatrixOrder order)
w System.Drawing.Graphics.RotateTransform(Single angle)
w ThinkGeo.MapSuite.Core.PrinterGeoCanvas.DrawTextCache(String text, GeoFont font, GeoBrush fillBrush, GeoPen haloPen, IEnumerable`1 textPathInScreen, Single xOffset, Single yOffset, Single rotateAngle, PrintPageEventArgs e)
w ThinkGeo.MapSuite.Core.PrinterGeoCanvas.DrawLevel(Collection`1 drawingItems, PrintPageEventArgs e)
w ThinkGeo.MapSuite.Core.PrinterGeoCanvas.printDocument_PrintPage(Object sender, PrintPageEventArgs e)
w System.Drawing.Printing.PrintDocument.OnPrintPage(PrintPageEventArgs e)
w System.Drawing.Printing.PrintDocument._OnPrintPage(PrintPageEventArgs e)
w System.Drawing.Printing.PrintController.PrintLoop(PrintDocument document)
w System.Drawing.Printing.PrintController.Print(PrintDocument document)
w System.Drawing.Printing.PrintDocument.Print()
w ThinkGeo.MapSuite.Core.PrinterGeoCanvas.EndDrawingCore()
w ThinkGeo.MapSuite.Core.GeoCanvas.EndDrawing()
w LabelledLayerPrintingDemo.FormMain.BtnPrint_Click(Object sender, EventArgs e) w D:\Visual Studio - Workspace\LabelledLayerPrintingDemo\LabelledLayerPrintingDemo\FormMain.cs:wiersz 106"
Below you can find link to demo application which shows my problem:
doc.abakus.net.pl/LabelledLayerPrintingDemo.zip
Is there any solution ?
Thank you.
Chris
Layer with Default Text Style printing exception
Krzysztof,
Thanks for your post and sample code to recreate this problem.
I did several tests against the printing, and found that this problem will be happening for labeling in LineStyle, the reason is that the LineStyle labels are always not straight forded in horizontal position, this can be considered as a bug in the PrinterGeoCanvas, I will hand this issue to our development team, hope they can focus on it soon.
Thanks for your reporting.
Any more questions or concerns please do not hesitate to let me know.
Thanks.
Yale