124

Is there a way in Inkscape to set the boundaries of the svg file the way they would be set if you export as a bitmap?

I want that there's no whitespace above, beneath, right or left of the object that I select.

3 Answers 3

113

To modify the document bounding box:

  1. Go to FileDocument Properties... (or press Shift +Ctrl + D)
  2. In the Custom size area on the Page tab, expand Resize Page to content... (or press Alt + Z)
  3. Click the Resize page to drawing or selection button (or press Alt + R)

You can add margins if you like

Document properties dialog

3
  • With the latest version, I cannot see this option.
    – bim
    Jun 7, 2023 at 12:37
  • @bim does this other answer work for you in the latest version?
    – JohnB
    Jun 7, 2023 at 18:45
  • 1
    Yes, that is working and I am using that. Thanks!
    – bim
    Jun 8, 2023 at 13:59
86

In the latest version of Inkscape (0.92.2 at this time), you can go to EditResize Page to Selection or press Ctrl+Shift+R.

0
6

Another way is to make a keyboard shorcut by going to Edit -> Preferences -> Interface -> Keyboard Shorcuts and searching for

"fitcanvastoselectionordraw"

You should find the "Fit Page to Selection Or Drawing" there.

Left click the shortcut column (blank space) to assign a shortcut.

Not the answer you're looking for? Browse other questions tagged or ask your own question.