I want to export layers of my SVG one by one into PDF, via Inkscape's CLI.

Say I have a simple Inkscape SVG consisting in a plain rectangle:

enter image description here

I want to export it into a PDF. If I export the whole SVG, then the produce pdf is fine.

inkscape --without-gui --export-area-page --file input.svg --export-pdf full_svg.pdf

enter image description here

However, if I export only the relevant layer, the output pdf is way too large.

inkscape --without-gui --export-id=layer1 --export-area-page --file input.svg --export-pdf layer1.pdf

enter image description here

How to actually limit the "export area" to the page's one when exporting using --export-id ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.