Make images respect margins

When I add an image to my text and anchor it to a paragraph, I can’t find the option to make it respect page margins. Let’s say image is anchored to a paragraph at the bottom of the page, and I set its vertical position to Bottom relative to associated paragraph. What I would expect is the image wrapping to the next page if there’s no room enough for the image below paragraph, but what I get is the image getting placed below paragraph, but well outside the bottom margin of the page. That’s totally undesirable, and creates all kind of weird effects whenever text flows.

Here’s an example of this behaviour.

Is there any way to make images anchored to a paragraph respect page margins? I could of course anchor images as a character, but I can’t believe paragraph anchoring doesn’t have such an option, since it’s pretty useless and unpredictable without it.


This is a limitation of Writer. This highly desirable feature is closer to DTP (desktop publishing) than document processing. I don’t know if it is available in TeX but it is likely.

Adding a frame (inserting a picture creates a frame) allows to put something (text, image, drawing, formula) outside the main text flow. The anchor point is set where you dictate. But the size of the frame is not taken into consideration. The frame extends from the anchor vertically and horizontally. Since it is outside the main text flow, the constraints for this flow (paragraph area, margins and others) no loger apply. The only left constraint is page size which causes clipping.

However, making some tests, I discovered an attribute not present in previous versions (I’m using LO and I don’t know when it appeared in Writer).

Right-click on the frame (or image, formula, …) and Properties, Type tab. In the Position section, at the very bottom there is a Keep within text boundaries which seems to do what you want. If the frame would cross the boundary of main flow, the frame is rejected to next page.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer) or comment the relevant answer.

@ajlittoz, the “keep within text boundaries” has always been there, but it used to have a really unhelpful name (something like “follow text flow”). Fortunately, that has changed :wink:

@RGB-es: this illustrates the need for clear vocabulary. I experienced the kind of inconvenience described in the question ant, though I am curious and “explorative”, I never experimented with this attribute … until now. I think I’ll review some of my documents to check the box and see what happens (I had manually take into consideration the page breaks and somehow explicitly position my frames which means any edit would require to do it again).