Search code examples
pdfsvginkscape

Inkscape svg to pdf crops too much


There is a slight error when exporting an svg file to pdf: the right margin of the plot is cropped too much (see the missing vertical line for completing the box area of the plot - this is how the pdf looks like): enter image description here

Here is the svg file (the box area is complete - the right margin line exists): enter image description here

I'm exporting with this command:

inkscape filename.svg --export-area-drawing --export-pdf=filename.pdf

I also did a test and manually exported the file from the GUI but it gave the same result. Is there a way to fix it? Like adding some padding? Can it be done from the command line?


Solution

  • Posting/linking the svg file could help. Tried to download the complete image, transform it as vector and export it as pdf, worked fine.

    wich version of Inkscape are you using ? It is up to date ? ( mine, that is working is version 0.48.4 r9939 on Ubuntu ).

    A solution I use when facing export problems is create a empty rectangle around my draw, set it to no border and no fill, and then apply "File" > "Document Properties" > "Resize page to content" > "Resize page to drawing or selection" with no object selected. Re-export.

    Try to make a "Vacuums Defs" to clean the svg file before export.

    Good luck to you!

    EDIT : command line equivalent to this manipulation can be achieved by adding "--export-area-drawing --vacuum-defs" as command line parameters.