Fit Canvas To Drawing from Command Line

Bug #1597921 reported by Patrick Fincannon on 2016-06-30
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Wishlist
Eduard Braun

Bug Description

Requesting the "FitCanvasToDrawing" "verb" be added as a command line only option?

As discussed in forum post here: http://www.inkscapeforum.com/viewtopic.php?f=5&t=4598&p=90664#p90664

I have a Ubuntu 14.04 LTS server running Inkscape 0.48 that is doing mass conversion from AI to SVG.
Part of the process is shrinking the Canvas to the size of the art work.
I've been able to successfully complete this using "inkscape --verb=FitCanvasToDrawing --verb=FileSave --verb=FileClose filename"
but this launches the GUI and slows down the process and is problematic for mass multi threaded conversions.

Thanks

Tags: cli Edit Tag help
jazzynico (jazzynico) on 2016-07-02
Changed in inkscape:
importance: Undecided → Wishlist
Eduard Braun (eduard-braun2) wrote :

I just pushed a fix to master in
https://gitlab.com/inkscape/inkscape/commit/c169d8f366f0765513e08e94057d1e0dc3872c73

It enables the command line switch "--export-area-drawing" when exporting to either plain SVG or Inkscape SVG via command line.

Changed in inkscape:
assignee: nobody → Eduard Braun (eduard-braun2)
milestone: none → 0.93
Eduard Braun (eduard-braun2) wrote :
Changed in inkscape:
status: New → Fix Committed
milestone: 0.93 → 0.92.3

apparently the insertion of --export-area-drawing option to --export-plain-svg option crased --export-pdf option.

Strangelly 0.91 produced files are not affected.

This command does not work with 0.92 files:

inkscape filename.svg -i layer1 -j -C --export-pdf=layer1.pdf

So I had to firstly export to SVG and then to PDF

inkscape filename.svg -i layer1 -j -C --export-plain-svg=layer1.svg
inkscape layer1.svg --export-pdf=layer.pdf

By the way. I had to produce a Python file to read SVG as an XML file and export each layer to a page of a PDF file, exporting a multi-page PDF.
I would like to suggest that a native option to export multi-page PDF be added on the next releases.

Eduard Braun (eduard-braun2) wrote :

Could you please open a new bug report with
- precise Inkscape version(s) used
- sample file
- precise steps to reproduce the issue

All export options work fine on my end with Inkscape 0.92.3 (2405546, 2018-03-11)

Bryce Harrington (bryce) on 2018-05-12
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers