Comment 1 for bug 168616

Revision history for this message
Tom Davidson (tjd-mit) wrote : Re: running FileSave verb from cmd line doesn't work

Funny thing, though: FitCanvasToSelectionOrDrawing *does* work:
 $ inkscape --verb=FitCanvasToSelectionOrDrawing --verb=FileSave --verb=FileClose drawing.svg ; See Bug 171511 .

The problem is that FitCanvasToDrawing doesn't 'dirty' the file, so Saving has no effect. You can verify this by just calling the first verb:
 $ inkscape --verb=FitCanvasToDrawing drawing.svg

The drawing resizes as expected, but if you close Inkscape, you don't get the dialog asking if you want to save your changes. The changes really are there though: if you choose File->Save As, then the resulting file is cropped as you'd expect. Hmm...

Another, possibly related issue is that if you use the -z or --without-gui command line option (which is supposed to suppress the GUI), then many other verbs also don't result in changes being saved:

$ inkscape -z --verb=FitCanvasToSelectionOrDrawing --verb=FileSave --verb=FileClose drawing.svg ;
$ inkscape -z --verb=EditSelectAll --verb=SelectionUnGroup --verb=FileSave tree.svg

This is all confirmed in latest SVN (rev 17195) under Linux.