What does the error that my margin is larger than the page mean, and how do I fix it?
It means the margin you entered, once taken from both sides, leaves the image no room at all. Reduce the margin or choose a bigger page. On an A5 page, for example, an 80 mm margin needs 160 mm of a width that is only 148 mm.
The margin counts twice
The Margin (mm) value in Images to PDF is the distance from each edge: left, right, top and bottom. Enter 30 mm and you take 60 mm off the width and 60 mm off the height. Many people type the number thinking of the total margin, and it doubles without them noticing.
The space left for the image is the page width minus twice the margin, and the height minus twice the margin. If either reaches zero or less, the tool refuses to build and shows the message that the margin is larger than the page and leaves no room for the image.
Examples from the layout function
- A5, 148 mm wide, with an 80 mm margin: 160 mm is needed out of 148, so the error appears.
- A5 with a 40 mm margin: 68 mm of width remains, and a square 1000 × 1000 px image is drawn 192.76 × 192.76 pt; small, but it works.
- A5 with a 10 mm margin: the same square image is drawn 362.84 × 362.84 pt, which is what most people want.
- A4, 210 mm wide, with an 80 mm margin: 50 mm remains, so the image is drawn only 141.74 × 141.74 pt. No error, but a tiny picture in the middle of a white page.
How to fix it
- If the big margin was not intended, enter a normal document value between 5 and 15 mm. The default is 10 mm.
- If you really want a wide frame around the image, pick a bigger page, for example A4 instead of A5.
- If you want a wide frame and a large image, choose Page fits the image. There the margin is added outside the image instead of being taken from it, so this error can never appear.
- Press Create PDF again after the change.
Why would anyone want a big margin?
Sometimes for good reasons: a small logo you want centred with lots of space around it, a page that will be hole punched and filed so it needs a wide edge, or a small card printed in the middle of a sheet. In those cases step the value up gradually and watch the preview after each build. The tool will not accept a margin above 100 mm at all, but even smaller values can be too much for a small page.
Can it work for one image and fail for another?
On fixed pages such as A4, A5 and Letter, the space left depends on the page, not the image, so either every image works or none does. Orientation does not change the outcome either, because the short side of the page stays the same whether it is portrait or landscape.
Common questions
Does the margin apply to every page?
Yes, one value for all pages, on all four sides.
What is the largest margin the tool accepts?
100 mm, and the smallest is 0 mm.
Does the background color show in the margin?
Yes, when the colored background option is on it fills the margin too.
