# Avoid problem with graphical transformation?

**URL:** <https://community.wolfram.com/t/avoid-problem-with-graphical-transformation/12670>\
**Category:** Questions\
**Tags:** computational-arts, mathematica, graphics-and-visualization, raspberry-pi\
**Created:** [June 29, 2018, 2:10am UTC](https://community.wolfram.com/t/avoid-problem-with-graphical-transformation/12670 "2018-06-29T02:10:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mst](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@mst](https://community.wolfram.com/u/mst)\
**Post date:** [June 29, 2018, 2:10am UTC](https://community.wolfram.com/t/avoid-problem-with-graphical-transformation/12670/1 "2018-06-29T02:10:20Z")

</div>

Hello,  
3 months ago I saved a notebook which was fine - but I am not sure which version was available at this point. However, actually I am using 11.2.0.0.  
The code is

```
WrapText[str_, transformation_] :=
 
 Rasterize[
  Module[{text}, 
   text = Style[str, Bold, FontFamily -> "Helvetica", FontSize -> 12, 
     LineBreakWithin -> False];
   Graphics@
     Cases[ImportString[ExportString[text, "PDF"], 
        "TextMode" -> "Outlines"][[1, 1]], 
      FilledCurve[a__] :> FilledCurve[a], Infinity] /. 
    transformation], ImageSize -> {300, 300}]

Export[NotebookDirectory[] <> "Test.jpg", 
 transformationSpiral = {x_Real, 
    y_Real} :> {Cos[-x/(12 Pi)]*(y + 4 + x/18), 
    Sin[-x/(12 Pi)]*(y + 4 + x/18)};
 WrapText[
  "All human beings are born free and equal in dignity and rights. \
They are endowed with reason and conscience and should act towards \
one another in a spirit of brotherhood.", transformationSpiral]]

```

with following result:

 ![6699Test.jpg](https://global.discourse-cdn.com/wolfram/original/3X/4/9/4984bb5e6580925fb4f395da39a7a99db82cb6db.jpeg)

The code is from [here](https://mathematica.stackexchange.com/questions/5719/how-can-i-wrap-text-around-a-circle) and should look like this (and definately did it 3 months ago…):

 ![yoOrK.png](https://global.discourse-cdn.com/wolfram/original/3X/5/3/5301630477b16d4ff137ee0465a9158a3f4c8629.png)  
.

On an old os-backup with MMA 11.0.1 it works fine - except that it looks a bit different and the message “file was created with a newer version”…any ideas whats going on here?

Was there any version between 11.0.1 and 11.2 on the Raspberry? I am almost sure I saved it with actual 11.2 - but why does the output look so ‘corrupted’ now? And how could I fix it?

Many thanks for your help and ideas,

---

<div class="post-metadata">

**Author:** ![lehinp](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/lehinp/32/8056_2.png) [@lehinp](https://community.wolfram.com/u/lehinp)\
**Post date:** [June 29, 2018, 10:23am UTC](https://community.wolfram.com/t/avoid-problem-with-graphical-transformation/12670/2 "2018-06-29T10:23:58Z")

</div>

Hello Michael,

I don’t have this problem with version 11.3 on Windoiws 7 x64. I recommend contacting the tech support.

---

<div class="post-metadata">

**Author:** ![mthiel](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mthiel/32/42877_2.png) [@mthiel](https://community.wolfram.com/u/mthiel)\
**Post date:** [June 29, 2018, 12:39pm UTC](https://community.wolfram.com/t/avoid-problem-with-graphical-transformation/12670/3 "2018-06-29T12:39:25Z")

</div>

Hi,

I cannot reproduce this issue on MMA11.2 or 11.3 on OSX either.

Cheers,

Marco

---

<div class="post-metadata">

**Author:** ![henrikschachner](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/henrikschachner/32/32119_2.png) [@henrikschachner](https://community.wolfram.com/u/henrikschachner)\
**Post date:** [June 29, 2018, 8:13pm UTC](https://community.wolfram.com/t/avoid-problem-with-graphical-transformation/12670/4 "2018-06-29T20:13:26Z")

</div>

Hi Michael,

no problem on `11.3.0 for Linux x86 (64-bit) (March 7, 2018)`.

Nice code, thanks for sharing! How on earth you could come up with

```
ImportString[< data.pdf >, "TextMode" -> "Outlines"]

```

I cannot find this anywhere in the documentation.

Regards – Henrik

---

<div class="post-metadata">

**Author:** ![gianlucagorni](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gianlucagorni](https://community.wolfram.com/u/gianlucagorni)\
**Post date:** [July 2, 2018, 7:24am UTC](https://community.wolfram.com/t/avoid-problem-with-graphical-transformation/12670/5 "2018-07-02T07:24:03Z")

</div>

Interesting code. Why do you write the replacement rule

```
FilledCurve[a__] :> FilledCurve[a]

```

in Cases? Wouldn’t the simple pattern `FilledCurve[a__]` have the same effect?

---

<div class="post-metadata">

**Author:** ![mst](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@mst](https://community.wolfram.com/u/mst)\
**Post date:** [July 6, 2018, 5:57am UTC](https://community.wolfram.com/t/avoid-problem-with-graphical-transformation/12670/6 "2018-07-06T05:57:53Z")

</div>

The problem seems to be somewhere in my OS I think (but where/why?). I did an apt-get update+upgrade on my os-backup - and this sd-card with MMA 11.2 now renders it as it should. Strange…but, however, it works fine now…as I saved it.

> How on earth you could come up with

```
ImportString[< data.pdf >, "TextMode" -> "Outlines"]

```

> Interesting code. Why do you write the replacement rule

```
FilledCurve[a__] :> FilledCurve[a]

```

that weren’t my ideas, I just found it in the mentioned link in my first post (on Stackexchange) and modified it slightly. For questions you have to ask the person who posted it there.

---

<div class="post-metadata">

**Author:** ![henrikschachner](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/henrikschachner/32/32119_2.png) [@henrikschachner](https://community.wolfram.com/u/henrikschachner)\
**Post date:** [July 6, 2018, 12:02pm UTC](https://community.wolfram.com/t/avoid-problem-with-graphical-transformation/12670/7 "2018-07-06T12:02:11Z")

</div>

I meanwhile found the probably original source of this code: It is contained in the [documentation on `FilledCurve`](http://reference.wolfram.com/language/ref/FilledCurve.html) (the last one of the “Neat Examples”). But the question remains: **How could one find the useful option `"TextMode" -> "Outlines"` of the function `ImportString` other than by chance and what are possibly other options?** To me it seems that `ImportString` is poorly documented.
