Fit Canvas To Drawing from Command Line

Bug #1597921 reported by Patrick Fincannon
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Wishlist
Patrick Storz

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
jazzynico (jazzynico)
Changed in inkscape:
importance: Undecided → Wishlist
Revision history for this message
Patrick Storz (ede123) 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
Revision history for this message
Patrick Storz (ede123) wrote :
Changed in inkscape:
status: New → Fix Committed
milestone: 0.93 → 0.92.3
Revision history for this message
Rômulo Manciola Meloca (rmeloca) wrote :

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.

Revision history for this message
Patrick Storz (ede123) 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)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.