Group Abstract Group Abstract

Message Boards Message Boards

Avoid problem with graphical transformation?

Posted 7 years ago

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:

enter image description here

The code is from here and should look like this (and definately did it 3 months ago...):

enter image description here.

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,

POSTED BY: Michael Steffen
6 Replies
POSTED BY: Michael Steffen
POSTED BY: Henrik Schachner

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?

POSTED BY: Gianluca Gorni

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

POSTED BY: Henrik Schachner

Hi,

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

Cheers,

Marco

POSTED BY: Marco Thiel
Posted 7 years ago

Hello Michael,

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

POSTED BY: Alexey Popkov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard