I would like to take an existing pdf and make it's right size wider (add white space), so that I can add my own hand-drawn annotations to it with my graphics tablet (loaded in Xournal++).

So far I found a way to do it via pdfcrop:

pdfcrop --margin '0 0 400 0' in.pdf out.pdf

But I lose the outline/bookmark section on the right.

Does anyone know of a way?
(A linux app/cmd is preferred, but I'd be open to exploring online or windows/osx tools if anyone knows..).


[By author]

After much research [1], I found a tool that works on Linux. It's free to try but I think it needs a 50$ license. I was able to use it to add a margin to my pdf and preserve the outline.

I have not been able to find a free tool. If someone does find one, please feel free to post an additional answer and I'd be happy to try it out.

If of help to anyone stumbling into the same problem, the tool I've used is Master pdf editor:


Document -> Page Layout -> 'width'.

(On RHEL/Fedora I had to install qt5-qtsvg library to get it to work.).

[1] Linux tools I've tried:
(as per https://www.tecmint.com/best-pdf-page-cropping-tools-for-linux/)

  • Briss - can't expand margin, only shrink.
  • pdfcrop - can expand, but looses table of content (as described by question).
  • Pdf Shuffler - doesn't crop, only re-arrange/delete pages.
  • Evince/Okular - Don't seem to have the ability to edit page layout/crop.
  • pdf-quench - couldn't get it to work.
  • KCrop - Can make a page smaller, but not bigger.

Since I lack reputation to comment, I would like to expand on Yuta's answer here. To add extra margin, use the following command of pdfCropMargins:

pdf-crop-margins -o out.pdf -p 100 -a4 $left $bottom $right $top in.pdf

The units are in BP (= 1/72 inch). Positive numbers shrink the margin and negative numbers expand it. For example, to expand the right margin by 1 inch, you would use -a4 0 0 -72 0.

Without -p 100 pdfCropMargins always shrinks the original margins to 10% before applying the absolute offsets from the a4 parameter.

pip install pdfCropMargins
pdf-crop-margins sample.pdf -o sample_cropped.pdf

The above worked for me. It crops sample.pdf without losing outlines. It should work for adding extra margins, which I did not try though.

Your Answer

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

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