# Large ShapeFile printing problem

**URL:** <https://community.thinkgeo.com/t/large-shapefile-printing-problem/3404>\
**Category:** WPF\
**Created:** [April 23, 2013, 8:22am UTC](https://community.thinkgeo.com/t/large-shapefile-printing-problem/3404 "2013-04-23T08:22:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaahin](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/shaahin/32/24960_2.png) [@Shaahin](https://community.thinkgeo.com/u/Shaahin)\
**Post date:** [April 23, 2013, 8:22am UTC](https://community.thinkgeo.com/t/large-shapefile-printing-problem/3404/1 "2013-04-23T08:22:49Z")

</div>

&nbsp;Hi,

I'm&nbsp;trying&nbsp;to&nbsp;print&nbsp;large&nbsp;shape&nbsp;file&nbsp;(200&nbsp;MB).&nbsp;

I&nbsp;use&nbsp;"Large&nbsp;Scale&nbsp;Map&nbsp;Printing"&nbsp;&nbsp;sample&nbsp;codes.

Print&nbsp;preview&nbsp;and&nbsp;printing&nbsp;works&nbsp;fine,&nbsp;The&nbsp;problem&nbsp;ist&nbsp;MapPrinterLayer&nbsp;doesn't&nbsp;show&nbsp;the&nbsp;shape&nbsp;.

I&nbsp;don't&nbsp;see&nbsp;this&nbsp;problem&nbsp;with&nbsp;small&nbsp;shapes.

Thanks&nbsp;in&nbsp;advance.

Shaahin

---

<div class="post-metadata">

**Author:** ![Edgar](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/b487fb/32.png) [@Edgar](https://community.thinkgeo.com/u/Edgar)\
**Post date:** [April 24, 2013, 10:30pm UTC](https://community.thinkgeo.com/t/large-shapefile-printing-problem/3404/2 "2013-04-24T22:30:14Z")

</div>

Hi&nbsp;Shaahin,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;post,&nbsp;please&nbsp;get&nbsp;the&nbsp;latest&nbsp;6.0.348.0&nbsp;or&nbsp;6.0.0.348&nbsp;and&nbsp;have&nbsp;a&nbsp;try.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;Edgar

---

<div class="post-metadata">

**Author:** ![Shaahin](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/shaahin/32/24960_2.png) [@Shaahin](https://community.thinkgeo.com/u/Shaahin)\
**Post date:** [April 28, 2013, 6:14am UTC](https://community.thinkgeo.com/t/large-shapefile-printing-problem/3404/3 "2013-04-28T06:14:46Z")

</div>

Thanks&nbsp;for&nbsp;your&nbsp;response.&nbsp;&nbsp;  
  
Using&nbsp;latest&nbsp;version&nbsp;solved&nbsp;my&nbsp;problem&nbsp;but&nbsp;now&nbsp;send&nbsp;to&nbsp;printer&nbsp;doesn't&nbsp;work&nbsp;with&nbsp;any&nbsp;shape&nbsp;file.&nbsp;

Stack&nbsp;trace&nbsp;:&nbsp;&nbsp;

System.NotSupportedException:&nbsp;"Specified&nbsp;method&nbsp;is&nbsp;not&nbsp;supported."

&nbsp;

&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.Core.PrinterGeoCanvas.NDQ=(GeoBrush&nbsp;NTQ=)

&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.Core.PrinterGeoCanvas.EzQ=(IEnumerable`1&nbsp;FDQ=,&nbsp;GeoPen&nbsp;FTQ=,&nbsp;GeoBrush&nbsp;FjQ=,&nbsp;Single&nbsp;FzQ=,&nbsp;Single&nbsp;GDQ=,&nbsp;PenBrushDrawingOrder&nbsp;GTQ=,&nbsp;PrintPageEventArgs&nbsp;GjQ=)

&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.Core.PrinterGeoCanvas.EDQ=(Collection`1&nbsp;ETQ=,&nbsp;PrintPageEventArgs&nbsp;EjQ=)

&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.Core.PrinterGeoCanvas.CTQ=(Object&nbsp;CjQ=,&nbsp;PrintPageEventArgs&nbsp;CzQ=)

&nbsp;&nbsp;&nbsp;at&nbsp;System.Drawing.Printing.PrintController.PrintLoop(PrintDocument&nbsp;document)

&nbsp;&nbsp;&nbsp;at&nbsp;System.Drawing.Printing.PrintController.Print(PrintDocument&nbsp;document)

&nbsp;&nbsp;&nbsp;at&nbsp;System.Drawing.Printing.PrintDocument.Print()

&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.Core.PrinterGeoCanvas.EndDrawingCore()

&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.Core.GeoCanvas.EndDrawing()

&nbsp;

Printing&nbsp;code&nbsp;:&nbsp;(This&nbsp;is&nbsp;ThinkGeo&nbsp;large&nbsp;scale&nbsp;printing&nbsp;example&nbsp;code&nbsp;and&nbsp;it&nbsp;works&nbsp;wth&nbsp;previous&nbsp;version&nbsp;of&nbsp;DLLs)

` var printerInteractiveOverlay =                (PrinterInteractiveOverlay) MapControl.InteractiveOverlays[Printpreviewoverlay];            var pagePrinterLayer = printerInteractiveOverlay.PrinterLayers["PageLayer"] as PagePrinterLayer;            var printDocument = new PrintDocument {DefaultPageSettings = {Landscape = true}};            if (pagePrinterLayer != null && pagePrinterLayer.Orientation == PrinterOrientation.Portrait)            {                printDocument.DefaultPageSettings.Landscape = false;            }            printDocument.DefaultPageSettings.PaperSize = GetPrintPreviewPaperSize(pagePrinterLayer);            var printerGeoCanvas = new PrinterGeoCanvas                                       {                                           DrawingArea = new Rectangle(0, 0,                                                                       Convert.ToInt32(                                                                           printDocument.DefaultPageSettings.                                                                               PrintableArea.Width),                                                                       Convert.ToInt32(                                                                           printDocument.DefaultPageSettings.                                                                               PrintableArea.Height))                                       };            if (pagePrinterLayer != null)                printerGeoCanvas.BeginDrawing(printDocument, pagePrinterLayer.GetBoundingBox(), MapControl.MapUnit);            var labelsInAllLayers = new Collection<SimpleCandidate>();            foreach (PrinterLayer printerLayer in printerInteractiveOverlay.PrinterLayers)            {                printerLayer.IsDrawing = true;                if (!(printerLayer is PagePrinterLayer))                {                    printerLayer.Draw(printerGeoCanvas, labelsInAllLayers);                }                printerLayer.IsDrawing = false;            }            printerGeoCanvas.EndDrawing();`

---

<div class="post-metadata">

**Author:** ![Edgar](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/b487fb/32.png) [@Edgar](https://community.thinkgeo.com/u/Edgar)\
**Post date:** [April 30, 2013, 1:21am UTC](https://community.thinkgeo.com/t/large-shapefile-printing-problem/3404/4 "2013-04-30T01:21:18Z")

</div>

Hi&nbsp;Shaahin,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Sorry&nbsp;the&nbsp;the&nbsp;confusing,&nbsp;please&nbsp;use&nbsp;the&nbsp;development&nbsp;branch&nbsp;6.0.348.0&nbsp;which&nbsp;works&nbsp;fine,&nbsp;the&nbsp;release&nbsp;branch&nbsp;6.0.0.348&nbsp;does&nbsp;not&nbsp;support&nbsp;the&nbsp;GeoLinearGradientBrush&nbsp;in&nbsp;PrinterGeoCanvas,&nbsp;so&nbsp;you&nbsp;got&nbsp;the&nbsp;exception.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;Edgar
