

The method that is most similar to how you do it in GIMP is at the bottom, though GIMP has many other features for this kind of jobs. You also have many other options available to you. Here is a description of how you can achieve a similar result. Instead, you need to select the objects that you want to remove from the picture. In general, this should not make a difference but because everything is an object you cannot in general “crop” a picture. The reason is that Inkscape uses vector graphics. When it comes to Inkscape, cropping is not the exact concept as expected from other drawing software. Inkscape -z -f output4.ps -D -l output2.The best way to crop is to create an object and shrink the picture to the object. Inkscape -z -f output.svg -D -P output4.ps
Inkscape -z -f output3.eps -D -l output2.svg Inkscape -z -f output.svg -D -E output3.eps # works well going to eps,ps but going back to svg, it has a deflect Inkscape -z -f output.svg -D -l output2.svg What I'm missing, inkscape should have pure CLI (without launching GUI). Use xsltproc to process it xsltproc -o output.svg strip-spaces.xslt input.svgĬrop it using inkscape inkscape -verb=FitCanvasToDrawing -verb=FileSave -verb=FileClose output.svg If you remove the newline like so.: Nīased on information from Glutanimate's answer.Ĭreate style sheet to strip that white space in text nodes The issue lies with the newline after the text value, i.e. If you open your SVG file in a text editor you will find the following passage: N I guess you already found your answer but just for posterity's sake here's what's actually going on behind the scenes. I am not familiar with the application but you might want to look around in the settings and see if there's any way to change this. Of course it would be preferable to instruct MarvinSketch not to add these spaces in the first place. The image should now be cropped properly:

Converting to PNG and back to SVG really isn't the right way to go about this. I just saw your question on AskUbuntu and I think you should give Inkscape another try.
