CLI option --export-margin stopped working

For many years I have scripted workflow for book publishing that takes an SVG image (of a book binding) and exports it to PDF using the page size as recorded in the SVG plus a trim margin appropriate for the pre-press workflow. The short version looks something like this:

$ inkscape binding.svg \
    --batch-process \
    --export-dpi=300 \
    --export-area-page \
    --export-margin=10 \
    -o binding.pdf

The --export-area-page option I had to add in May 2017 in response to an Inskcape release that changed the default from page to drawing. Unfortunately in the latest release (Inkscape 1.3) the --export-margin option seems to have stopped working. This command now exports exactly the page area. I can use --export-drawing-area to get the full canvas, but that is the wrong size for my press output. What I need is the page area plus an exact trim margin.

The --export-margin value is still accepted by the CLI and is still documented in the --help text, but it does not seem to do anything at all, no value seems to have any affect.


Edit: I did some playing around with the GUI and have a few more results. I saw these two items in the release notes:

  • You can set the bleed width by first clicking on the double-arrow, and then expanding the dialog at the bottom, then you can use the same syntax as for the other number field above.
  • Bleeds will be used for PDF export.

I thought this might be a solution to get things working. From the GUI I edited a sample of my SVG inputs and added a bleed setting equivalent to what I actually want the page trim to be. I tried exporting from the GUI (page) and still it did not output any margin at all.

Then I went back to the CLI and tried the modified SVG with bleed values set in page properties. Walla that actually outputs what I need! The value to --export-margin=N is completely ignored, but the value set as bleed is used.

Hence both the CLI and GUI export seem broken, but combined I can kind of get what I need as a workaround.

Edited by Caleb Maclennan