ThinkGeo.MapSuite.Layers.Printers

Please upgrade to version 12 (Search ThinkGeo.Core on NuGet) if possible. Version 12 works with both .NET Framework and .NET Core, has much less dependencies and many other benifits over 10.0. Printer Layer is available in ThinkGeo.Printers in Version 12. ThinkGeo.MapSuite.Layers.PrinterLayers is a layer extension to the Map Suite product line, see below for compatibility. This is used to design page layouts for maps. You can use this layer to layout the physical page to be printed. This package integrates the following printer layers: 1. DataGridPrinter, 2. ImagePrinter, 3. LabelPrinter, 4. LegendPrinter, 5. MagneticDeclinationPrinter, 6. MapPrinter, 7. PagePrinter, 8. ScaleBarPrinter, 9. ScaleLinePrinter, 10. ScaleTextPrinter ** This is an extension for use in ThinkGeo's Map Suite product line, see below, as it cannot be used stand alone. ** Wiki Documentation: http://wiki.thinkgeo.com/wiki/map_suite_api Supported Platforms: Windows, Linux, macOS - Compatible Products - Map Suite Desktop for WPF Map Suite Desktop for WinForms Map Suite Web for WebForms Map Suite Web for MVC Map Suite Web for WebAPI


Keywords
.NET, Dpi, GIS, Map, MapSuite, Mapping, Print, Printers, Spatial, Suite, ThinkGeo, map-suite, printer, wpf
Install
Install-Package ThinkGeo.MapSuite.Layers.Printers -Version 10.6.19

Documentation

Print Preview Sample for Wpf

Description

In this sample we show you how to add robust printing support to your Map Suite applications for the desktop, WPF, web or services environments. Using the code in this sample, you'll be able to build a Print Preview interface that lets your users interactively arrange items (such as a map, scale line, labels, data grid or image) on a virtual page before printing the result to a printer, exporting to a PDF or to a bitmap image. Maps are printed using vector graphics so you can be sure the output will look great on anything from a PDF to a large plotter. The printing system also includes low-level report building classes that make it easy to generate reports in the web or services environment.

To help you understand the sample, as well as Map Suite's new printing system upon which it is based, check out our instructional video that will introduce you to all of these concepts and walk you through the sample solution.

Please note that you will need version 5.0.102.0 or newer of Map Suite in order to use the new printing features. For more information on how to upgrade, see the Map Suite Daily Builds Guide.

Note: Users of Map Suite Web, Silverlight and Services Editions will not have access to the interactive drag-and-drop page layout interface pictured here. However, these editions can still be used to programmatically design page layouts in code and then export them to a printer.

Please refer to Wiki for the details.

Screenshot

Requirements

This sample makes use of the following NuGet Packages

MapSuite 10.0.0

About the Code

Map1.ZoomLevelSet = new PrinterZoomLevelSet(Map1.MapUnit, PrinterHelper.GetPointsPerGeographyUnit(Map1.MapUnit));

Map1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.StandardColors.LightGray);

PrinterInteractiveOverlay printerOverlay = new PrinterInteractiveOverlay();

Map1.InteractiveOverlays.Add("PrintPreviewOverlay", printerOverlay);
Map1.InteractiveOverlays.MoveToBottom("PrintPreviewOverlay");

PagePrinterLayer pagePrinterLayer = new PagePrinterLayer(PrinterPageSize.AnsiA, PrinterOrientation.Portrait);
pagePrinterLayer.Open();
printerOverlay.PrinterLayers.Add("PageLayer", pagePrinterLayer);

Getting Help

Map Suite Desktop for Wpf Wiki Resources

Map Suite Desktop for Wpf Product Description

ThinkGeo Community Site

ThinkGeo Web Site

Key APIs

This example makes use of the following APIs:

About Map Suite

Map Suite is a set of powerful development components and services for the .Net Framework.

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.