Author Topic: Inserting SVG into Word 365 - spurious red line?  (Read 998 times)

September 19, 2018, 01:54:00 AM
Read 998 times

AndrewIC

  • Sr. Newbie

  • Offline
  • **

  • 3
Hello,

I suspect this may be a question for MS, but here goes. I am using Inkscape to convert circuit schematics and PCB board layouts generated by Eagle into SVGs, so I can insert those into Word document. It almost works...

My method is, save the schematic as a PDF in Eagle 7.7.0, import the PDF into Inkscape 0.92, resize to selection and save the SVG. Then insert the SVG into a Word 365 document as a picture. The SVGs look perfect in Inkscape, Chrome, Firefox, but when pasted into Word a spurious red line appears at the bottom on the image. Change tracking in Word is definitely turned off, so it's not change markup, and the red line persists when the Word doc is printed or converted to a PDF for distribution.

Has anyone come across this problem before, or have a fix for it? In all other respects the SVGs look good and much sharper than I could achieve by pasting in a PNG, so I'd really like this to work!

This does NOT happen with some Excel charts I processed the same route, they look fine, and the red line is not visible in any layer in Eagle.

Flummoxed.

Thanks & Regards
Andrew
  • 0.92
  • Win 10

September 19, 2018, 07:47:42 AM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome to the forum!

Could you show us a screenshot of the red line, and also share the SVG file with us?  I want to make sure there's not something in the SVG file.  And also, I want to see the red line.

There's a little bell ringing in the back of my mind, that I've seen this problem before.  But I can't remember enough to try to search it out.  I'll do some general searching though, and post back if I find something.  Meanwhile, seeing the problem (SVG file and screenshot) will 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                       

September 19, 2018, 10:51:32 AM
Reply #2

AndrewIC

  • Sr. Newbie

  • Offline
  • **

  • 3
Hi, thanks. Attached are the SVG (zipped), source PDF, and screenshot from Word. MS Word build is 1808,
example.png
*example.png
(46.65 kB . 455x348)
(viewed 264 times)


*example.pdf
(35.12 kB - downloaded 66 times)



(Edited to fix numpty failure to attach the right files  :( )
  • 0.92
  • Win 10

September 19, 2018, 12:40:42 PM
Reply #3

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Hhmm.....  Well my searching wasn't very fruitful.

Looking at your files, I don't see any objects which might be directly causing the problem.  Because the red line corresponds to the bottom of the image, and appears to be exactly the width of the SVG, I agree with you that the problem might be with Word.

But I do remember a little more from that tiny bell in my head.  There are a couple of clipping paths in your SVG file, which don't appear to be very necessary, or really necessary at all (sometimes they are added in format conversions, such as the PDF to SVG).  I seem to recall the solution in another message thread, where clipping was causing a problem in Word (I don't remember exactly what that problem was).

So you could try Ungrouping everything in the SVG file (it takes 6 or 8 clicks on Ungroup - or just click Ungroup (or whatever the key shortcut is) until the status bar says "No groups to ungroup").  That will automatically release the clips and delete the clipping paths.  Then save the SVG and insert it into Word.

If that doesn't work, and using Word is not a requirement, you might consider using LibreWriter (part of the Libre Office suite).  Or even Scribus, which is open source desktop publishing, which supports SVG.
  • 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 20, 2018, 03:49:03 AM
Reply #4

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
EMF and WMF are more 'Word-compatible' vector output formats from Inkscape. However, exporting to them is not guaranteed to work perfectly.
Can you give it a shot and see if it works for your specific drawing?
Can Word import pdf documents as pictures?

September 20, 2018, 07:17:19 AM
Reply #5

AndrewIC

  • Sr. Newbie

  • Offline
  • **

  • 3
Doh! I can't see the wood for the trees!  :duh:

The (new) paragraph into which the SVG was inserted had the font set to red and strike-through turned on. I've no idea why, nothing else in the document is read/strike-through. Unclick the strike-through button, red line disappears....

Problem seems to be with the user of Word...

New problem is that I can't put a border around the pic (it changes the colour of a load of lines in the SVG but I can live without that. I may try the other formats as suggested, I'm trying to get a nice sharp result.

Thanks!
Andrew
  • 0.92
  • Win 10

September 21, 2018, 04:10:19 AM
Reply #6

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
You didn't say how you're trying to add a border, but it sounds like you must have a group selected, rather than a single line or path.  Try this:

 -- draw a rectangle using Rectangle tool
 -- remove the fill (if there is one)
 -- add a stroke (if there isn't one already)
 -- set the color for the stroke

If you need more details, just let us know  :)
  • 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