Author Topic: Grey outline round image when exporting to pdf  (Read 1913 times)

January 04, 2018, 11:05:26 AM
Read 1913 times

David

  • Sr. Newbie

  • Offline
  • **

  • 2
Sorry if this has been asked before. It seems like there are a few known issues with exporting to pdf but I couldn't find my particular problem.

I'm producing colour plots in Matlab and then exporting them as pdf's, where the axes and text are vectors and the colour plot itself is rasterised. I use Inkscape to make some final changes to these figures and produce multi-panel figures, before exporting again to pdf.

I have attached the original pdf exported from Matlab, the svg produced by importing this into Inkscape (using Poppler/Cairo import), and the subsequent exported pdf (using pdf 1.5). As you can see, the exported pdf has an ugly grey outline around the colour plot. Any idea how I can remove this?
  • 0.92
  • Windows 10

January 04, 2018, 12:01:56 PM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome to the forum!

I would have to guess that's a bug.  I've tried several different manipulations, but that outline is persisting.  I'll search for existing bug reports.
  • 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                       

January 04, 2018, 02:11:54 PM
Reply #2

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Well, I can't find any existing bug report, although there's a chance one exists and I just don't understand certain technical language.

I would suggest filing a new bug report https://launchpad.net/inkscape.  Then you can communicate directly with developers (who hardly ever visit forums).  Info about making a bug report, if you need it:  https://inkscape.org/en/contribute/report-bugs/

And meanwhile, I wonder if there might be some other workflow, where this problem could simply be sidestepped?  I've never used Matlab, and don't even know what it is.  But I have to wonder if there might be some other options, somewhere along the line?

What if you imported the PNG into Inkscape, rather than in Matlab?  I have no idea if that would help.  But what I'm thinking is that the PNG would only have to be saved once.

Sorry, I wish I could be more helpful.
  • 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                       

January 04, 2018, 04:10:35 PM
Reply #3

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Yeah, it's very weird. For your project, you can try to replace the image in your drawing with this one:

It seems to have to do with the transparency at its borders, somehow...

January 05, 2018, 02:25:46 AM
Reply #4

David

  • Sr. Newbie

  • Offline
  • **

  • 2
Thanks for your help! I will submit a bug report about this.

In the meantime, I have realised that Matlab allows me to export figures as svg files. Importing these into Inkscape and exporting as pdf seems to avoid this issue, so presumably something is going wrong when the pdf is being converted into svg by Inkscape.
  • 0.92
  • Windows 10

January 05, 2018, 11:22:39 AM
Reply #5

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Might be a reason, yes. Thanks for making a report! (and good you found a workaround - matlab svgs have their own issues, though... It doesn't always stick to the SVG standard, as far as I remember - let us know if you encounter issues there).

July 25, 2018, 02:44:43 PM
Reply #6

EmceeRush

  • Newbie

  • Offline
  • *

  • 1
It seems to have to do with the transparency at its borders, somehow...

Thanks for that tip.  I was seeing a similar problem, and this was the key.  In my case, I didn't need the transparency, so I used an image editor to eliminate the transparency (GIMP: add white layer, move to bottom, export png), and then re-imported.  It looked fine in the pdf export after that.  So, if other people have this problem and can afford to lose the transparency, this might be an option.
  • 0.92
  • Windows 7, 10