# PDFExtension Vector Drawing Text does not scale with Map

**URL:** <https://community.thinkgeo.com/t/pdfextension-vector-drawing-text-does-not-scale-with-map/923>\
**Category:** WinForms\
**Created:** [December 16, 2009, 1:58pm UTC](https://community.thinkgeo.com/t/pdfextension-vector-drawing-text-does-not-scale-with-map/923 "2009-12-16T13:58:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jneumann](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/977dab/32.png) [@jneumann](https://community.thinkgeo.com/u/jneumann)\
**Post date:** [December 16, 2009, 1:58pm UTC](https://community.thinkgeo.com/t/pdfextension-vector-drawing-text-does-not-scale-with-map/923/1 "2009-12-16T13:58:28Z")

</div>

I&nbsp;am&nbsp;using&nbsp;Desktop&nbsp;Edition&nbsp;3.0.

When&nbsp;I&nbsp;attempt&nbsp;to&nbsp;draw&nbsp;my&nbsp;layers&nbsp;to&nbsp;a&nbsp;pdf&nbsp;page&nbsp;using&nbsp;the&nbsp;PDFExention&nbsp;Sample,&nbsp;my&nbsp;labels&nbsp;are&nbsp;"bigger"&nbsp;then&nbsp;they&nbsp;should&nbsp;be.&nbsp;&nbsp;This&nbsp;becomes&nbsp;very&nbsp;noticable&nbsp;along&nbsp;the&nbsp;edges&nbsp;where&nbsp;partials&nbsp;are&nbsp;supposed&nbsp;to&nbsp;be&nbsp;supressed.

The&nbsp;labels&nbsp;draw&nbsp;because&nbsp;the&nbsp;supress&nbsp;algoritm&nbsp;believes&nbsp;they&nbsp;will&nbsp;fit,&nbsp;but&nbsp;when&nbsp;the&nbsp;pdf&nbsp;document&nbsp;is&nbsp;zoomed,&nbsp;the&nbsp;text&nbsp;scales&nbsp;faster&nbsp;then&nbsp;the&nbsp;map&nbsp;and&nbsp;therefore&nbsp;the&nbsp;text&nbsp;of&nbsp;labels&nbsp;can&nbsp;bleed&nbsp;off&nbsp;the&nbsp;edges.

Is&nbsp;there&nbsp;anyway&nbsp;to&nbsp;resolve&nbsp;this?

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [December 16, 2009, 7:51pm UTC](https://community.thinkgeo.com/t/pdfextension-vector-drawing-text-does-not-scale-with-map/923/2 "2009-12-16T19:51:39Z")

</div>

Jim,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;post&nbsp;and&nbsp;questions.&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;assume&nbsp;this&nbsp;problem&nbsp;is&nbsp;caused&nbsp;by&nbsp;the&nbsp;size&nbsp;of&nbsp;the&nbsp;PDF&nbsp;page&nbsp;is&nbsp;not&nbsp;compatible&nbsp;with&nbsp;map&nbsp;with&nbsp;and&nbsp;map&nbsp;height.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Could&nbsp;you&nbsp;try&nbsp;to&nbsp;modify&nbsp;as&nbsp;the&nbsp;PDF&nbsp;page&nbsp;size&nbsp;to&nbsp;match&nbsp;the&nbsp;ratio&nbsp;of&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;map&nbsp;with&nbsp;and&nbsp;map&nbsp;height&nbsp;to&nbsp;see&nbsp;it&nbsp;works?&nbsp;  
&nbsp;&nbsp;  
&nbsp;Any&nbsp;more&nbsp;questions&nbsp;just&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Yale&nbsp;  
&nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![jneumann](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/977dab/32.png) [@jneumann](https://community.thinkgeo.com/u/jneumann)\
**Post date:** [January 22, 2010, 2:43pm UTC](https://community.thinkgeo.com/t/pdfextension-vector-drawing-text-does-not-scale-with-map/923/3 "2010-01-22T14:43:04Z")

</div>

Are&nbsp;you&nbsp;saying&nbsp;that&nbsp;the&nbsp;aspect&nbsp;ratio&nbsp;may&nbsp;be&nbsp;different?&nbsp;&nbsp;I’m&nbsp;not&nbsp;quite&nbsp;clear&nbsp;on&nbsp;what&nbsp;you&nbsp;are&nbsp;suggesting.

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [January 25, 2010, 2:23am UTC](https://community.thinkgeo.com/t/pdfextension-vector-drawing-text-does-not-scale-with-map/923/4 "2010-01-25T02:23:14Z")

</div>

&nbsp;

Jim.  
&nbsp;  
Extent&nbsp;and&nbsp;ratio&nbsp;of&nbsp;the&nbsp;width&nbsp;and&nbsp;height&nbsp;are&nbsp;very&nbsp;important&nbsp;for&nbsp;the&nbsp;PDF&nbsp;printing&nbsp;in&nbsp;your&nbsp;situation.&nbsp;DrawingArea&nbsp;is&nbsp;a&nbsp;specific&nbsp;screen&nbsp;area&nbsp;which&nbsp;used&nbsp;for&nbsp;filling&nbsp;the&nbsp;image&nbsp;to.&nbsp;There&nbsp;might&nbsp;be&nbsp;something&nbsp;setting&nbsp;issue&nbsp;in&nbsp;your&nbsp;code.&nbsp;  
Please&nbsp;look&nbsp;at&nbsp;the&nbsp;sample&nbsp;code&nbsp;below.&nbsp;If&nbsp;you&nbsp;still&nbsp;can&nbsp;not&nbsp;solve&nbsp;the&nbsp;problem,&nbsp;could&nbsp;you&nbsp;paste&nbsp;your&nbsp;code&nbsp;here&nbsp;so&nbsp;that&nbsp;we&nbsp;can&nbsp;debug&nbsp;it?  
&nbsp;  
`            PdfDocument doc = new PdfDocument();            PdfPage page = doc.AddPage();            page.Width = 800;            page.Height = 800;            double resolution = Math.Max(Map1.CurrentExtent.Width / Map1.Width.Value, Map1.CurrentExtent.Height / Map1.Height.Value);            RectangleShape newDrawingExtent = new RectangleShape(Map1.CurrentExtent.UpperLeftPoint.X, Map1.CurrentExtent.UpperLeftPoint.Y, Map1.CurrentExtent.UpperLeftPoint.X + 800 * resolution, Map1.CurrentExtent.UpperLeftPoint.Y - 800 * resolution);            PdfGeoCanvas canvas = new PdfGeoCanvas();            canvas.BeginDrawing(page, newDrawingExtent, GeographyUnit.DecimalDegree);            worldLayer.Open();            worldLayer.Draw(canvas, new Collection<SimpleCandidate>() { });            worldLayer.Close();            canvas.EndDrawing();            canvas.DrawingArea = new System.Drawing.Rectangle(0, 0, 400, 400);            canvas.BeginDrawing(page, Map1.CurrentExtent, GeographyUnit.DecimalDegree);            rasterLayer.Open();            rasterLayer.Draw(canvas, new Collection<SimpleCandidate>() { });            rasterLayer.Close();            canvas.EndDrawing();            doc.Save("c:\\1.pdf");`  
&nbsp;  
Thanks  
&nbsp;  
James

---

<div class="post-metadata">

**Author:** ![evan](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/54ee81/32.png) [@evan](https://community.thinkgeo.com/u/evan)\
**Post date:** [February 10, 2016, 12:30am UTC](https://community.thinkgeo.com/t/pdfextension-vector-drawing-text-does-not-scale-with-map/923/5 "2016-02-10T00:30:16Z")

</div>

Hi,&nbsp;Jim.&nbsp;&nbsp;  
Thanks&nbsp;for&nbsp;sharing&nbsp;your&nbsp;problem.&nbsp;As&nbsp;for&nbsp;me,&nbsp;I&nbsp;have&nbsp;seldom&nbsp;tried&nbsp;to&nbsp;draw&nbsp;my&nbsp;layers&nbsp;to&nbsp;a&nbsp;pdf&nbsp;page&nbsp;using&nbsp;the&nbsp;PDF&nbsp;Exention&nbsp;Sample&nbsp;before.&nbsp;Have&nbsp;you&nbsp;ever&nbsp;worked&nbsp;it&nbsp;out?&nbsp;I&nbsp;wonder&nbsp;whether&nbsp;you&nbsp;have&nbsp;any&nbsp;exprience&nbsp;about&nbsp;the&nbsp;process&nbsp;of&nbsp;text&nbsp;extraction&nbsp;in&nbsp;pdf&nbsp;files.&nbsp;Because&nbsp;there&nbsp;is&nbsp;something&nbsp;wrong&nbsp;with&nbsp;my&nbsp;pdf&nbsp;reader.&nbsp;I&nbsp;need&nbsp;convert&nbsp;pdf&nbsp;into&nbsp;text&nbsp;or&nbsp;other&nbsp;formats.&nbsp;Any&nbsp;suggestion&nbsp;will&nbsp;be&nbsp;appreciated.&nbsp;Thanks&nbsp;in&nbsp;advance.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
  
  
  
  
  
  
  
  
  
Best&nbsp;regards,&nbsp;&nbsp;  
Pan

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [February 10, 2016, 9:36pm UTC](https://community.thinkgeo.com/t/pdfextension-vector-drawing-text-does-not-scale-with-map/923/6 "2016-02-10T21:36:56Z")

</div>

Hi&nbsp;Pan,&nbsp;  
&nbsp;&nbsp;  
&nbsp;We&nbsp;are&nbsp;glad&nbsp;to&nbsp;hear&nbsp;your&nbsp;discuss&nbsp;about&nbsp;the&nbsp;pdf&nbsp;conversion,&nbsp;because&nbsp;it&nbsp;can&nbsp;help&nbsp;anyone&nbsp;met&nbsp;this&nbsp;problem.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Don
