spook / ink2pdf

Inkscape to Multi-Page PDF Document
MIT License
17 stars 4 forks source link

Fix for changed command-line options #1

Closed TpmKranz closed 3 years ago

TpmKranz commented 3 years ago

It seems that with the move to version 1.x, inkscape's command-line options were overhauled. Your script dies without any indication of what the problem might be. Executing the command manually yields

Warning: Option --without-gui= is deprecated
Unknown option -A

One solution that ensures backwards compatibility is to check inkscape's version string and choose the command line options appropriately. I'm not entirely sure that my method is robust, but it was tested on Ubuntu 18.04 (Inkscape 0.92.3 (2405546, 2018-03-11)) and Fedora 33 (Inkscape 1.0.1 (3bc2e813f5, 2020-09-07)) and is working as expected.

spook commented 3 years ago

@TpmKranz Thanx for this PR! I'll run it thru a few more tests and merge if OK.