Author Topic: command line --export-svg and pattern fill  (Read 987 times)

September 24, 2018, 03:40:29 PM
Read 987 times

pipfrosch

  • Sr. Newbie

  • Offline
  • **

  • 8
Hello,

Code: [Select]
inkscape input.svg --export-eps=output.eps

Usually that works beautifully for me, even does fonts right when the svg references fonts.

However it seems that when a path has a pattern fill, inkscape doesn't apply it. It does with rect but not with path.
Is there a fix? e.g. something I can do in the SVG that makes it easier for inkscape to add pattern on export?

The SVG is hand coded, not created by inkscape. Pattern fill shows when rendered by FireFox.
  • 0.92.3
  • GNU Liux

September 24, 2018, 03:58:35 PM
Reply #1

pipfrosch

  • Sr. Newbie

  • Offline
  • **

  • 8
To expand, here is the pattern definition:
Code: [Select]
<pattern id="squiggle" patternUnits="userSpaceOnUse" width="10" height="10" patternTransform="rotate(119)">
      <path fill="none" stroke="cyan" stroke-opacity="1" stroke-width="3" d="m 0,5 c 3.333333,4 6.666667,-4 10,0"/>
</pattern>

In FireFox that works as fill for both rect and path nodes but when exporting to eps via command-line only the rect nodes get the pattern applied.
  • 0.92.3
  • GNU Liux

September 24, 2018, 05:19:44 PM
Reply #2

pipfrosch

  • Sr. Newbie

  • Offline
  • **

  • 8
I wonder if it is related to this -

http://www.inkscapeforum.com/viewtopic.php?t=17887

My patterns are paths. However I don't see how it could be a render problem if the pattern works in rect nodes, just not in path nodes.
  • 0.92.3
  • GNU Liux

September 24, 2018, 07:15:06 PM
Reply #3

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Oh gosh.  The reason I haven't answered this message is because I know little to nothing about using the commandline.  Well I mean, I guess that little bit of code you showed is the commands for the commandline?

Do I understand correctly that it seems to work only when you view it with Firefox?  That would give me the impression that it's working, that Inkscape is applying the pattern correctly, but that the problem is happening with whatever you're using the view the file.

Hmmm yes, the message you referenced seems to indicate the problem is related to the viewer as well.

As to why it works when a rectangle is used but not with a path, I don't know.

Or is this a problem with using the commandline?  If you do this with the gui, do you have the same problem?

Unfortunately, I can't seem to keep my eyes propped open tonight.  But I'll be back tomorrow, and be ready to try testing using the gui.  Or otherwise at least I'll be able to think a bit more clearly.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

September 24, 2018, 07:52:59 PM
Reply #4

pipfrosch

  • Sr. Newbie

  • Offline
  • **

  • 8
Okay I changed the pattern to a filled path with no stroke - actually looked better in firefox, but still no joy.

Opened the actual EPS file in Atril document viewer - and it's weird.

One pattern that doesn't work when embedding eps via latex does show but is mutilated. The other pattern doesn't show.

So I'm guessing it has to do with SVG patterns not being easily translated into something postscript can deal with. Gah.
  • 0.92.3
  • GNU Liux

September 24, 2018, 07:58:55 PM
Reply #5

pipfrosch

  • Sr. Newbie

  • Offline
  • **

  • 8
Inkscape export to PDF seems to work - when viewed in chromium but not when viewed in in evince.

So yes it's a render problem.
  • 0.92.3
  • GNU Liux

September 24, 2018, 08:10:21 PM
Reply #6

pipfrosch

  • Sr. Newbie

  • Offline
  • **

  • 8
Okay using pdf image instead of eps in the latex works w/ inkscape exporting to PDF even in evince displaying the latex generated PDF.
  • 0.92.3
  • GNU Liux

September 25, 2018, 10:21:38 PM
Reply #7

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
So that solution works for you?

Sorry, I wish I could have been more help.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann