Delete pages where graphics are anchored to subsequent pages

If a writer document has graphics anchored to later pages, the earlier pages, even if empty, cannot be deleted. I understand that this is because graphics are anchored to a certain page, but it seems intuitive that the graphics would move up to fill empty pages. Is there a way to ‘move up’ the later pages, graphics and all, to fill the empty space?

It is normally not a good idea to anchor graphics to pages.

Set anchorage for the image


If you change the anchoring of your graphics, e.g. anchoring at the paragraph, you will have the possibility to position the images and you will be able to arrange your text flow again so that there will be no more empty pages.


You can also preset the anchoring of your graphics.

Choose Tools>Options>LibreOfficeWriter>Formatting Aids from the menu.

For “Image” you can choose “At Paragraph”.

2 Likes

With me:
Version: 7.2.4.1 (x64) / LibreOffice Community
Build ID: 27d75539669ac387bb498e35313b970b7fe9c4f9
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL

Thanks, @Hrbrgr , I thought that was going to be the answer. However I have these files with a lot of images anchored to page, and it would be useful to manipulate them. I am particularly grateful for your tip to change the default anchor point, which I had never noticed.

You must understand the semantics behind anchors. Anchor mode translates the logical relationship between the “object” (image, frame, …) and main text flow.

The most basic mode is As character making the object part of text flow. It is then managed just like any other (huge) character, subject to line wrap, line spacing computation, etc.

The “common” mode if To character or To paragraph (the latter being equivalent to first character in paragraph). The object is not inserted into the flow but aside it. It is laid out “close” to the anchor, in the same page as the anchor. If the paragraph is moved further to text reformatting to another page, the “object” will follow it, keeping the same relative position against the paragraph.
(FYI, To character and To paragraph make a difference only when the paragraph straddles a page break.)

To page is provided to partially bridge the gap with DTP. In this mode, the “object” is not linked at all with the text flow. Whatever happens to your text will have absolutely no impact on your “object”. However, Writer will maintain the only constraint known to it, i.e. absolute page position, through eventual blank pages. Since these blank pages result from a consistency constraint, you can’t delete them.

Of course, you can change the anchor mode. The most convenient way is through style assignment (eventually first with a change to another frame style to get rid of direct formatting before reapplying the present style if still relevant). But the anchor position will not be where you desire it. This can be fixed by dragging manually the anchor to its target position.

3 Likes

Thanks @ajlittoz. I get that.

I came across a similar problem. Now, the reason to use page anchors is that figures jump to erratically when editing a large document. In my case, I used optimal wrap and aligned the images at a given distance from the left side of a left pages and a different value for the right pages, yielding a regular layout. Would something like that available so that when an image changes page, it would also changes alignment?
Cheers,
Didier

Never use Anchor to page before you understand this is an ersatz DTP (desktop publishing) feature, to be used in DTP context, though Writer is primarily a text-flow management program. Use it only when your document is made of pages, i.e. every page is independent of each other and text within them must not spill over into next pages. And even in this case, other anchors are better.

Jumping around “erratically” is not the correct observation. Since your frames are anchored To page, take it the other way round: your frames are forever attached to a physical page. When you edit your document, your text moves around. And this is the correct behaviour. As you anchored To page, your frames are not related to text and text is free to position itself anywhere.

So, the morale of the storyis: anchor your frames to the object (paragraph or character) they are logically related to.

As I already explained in several answers, the Anchor will determine inside which page the frame will be set, i.e. the same as its “reference” object.

Position inside the page is a completely different story. The Type tab of a frame style offers a lot of (automatic) locations in the Position section. Learn frame styles (be aware that mastering them is the most daunting task in Writer).

Avoid “given distance from …” as much as you can. This gives absolute coordinates to your frame and it can’t follow easily your text.

Short answer: yes.

Long answer: you need a dedicated frame style and, above all, you must in absolutely no circumstances touch your frame with the mouse, be it for resizing or moving because it will introduce dreaded direct formatting which, as always, overrides styles and, in the case of frames, is next to impossible to remove.

  1. Create a new frame style
    I call it Mirrored but give it any name convenient for you.
  2. Go to Type tab
    • Define its global properties line Anchor and Size.
      If your frame is to contain text, set its width to some reasonable value, you can leave height to AutoSize. If it is supposed to contain images, set both height and width.
    • The trick if to tick Mirror on even pages to trigger alternation. Horizontal Position now offers Inside and Outside (instead of left and right).
    • With a To paragraph anchor, select paragraph-related reference positions. Horizontally, Paragraph text area is a good choice to have the frame aligned against the margins. Vertically, Center or Top relative to Paragraph text area is good.
      But your paragraph may be near the bottom of the page. There is then a risk that the frame overflows the bottom margin and page limit. To compensate, tick Keep inside text boundaries. This allows for a transfer of the frame to next page without manual intervention.
  3. Go to Wrap tab to untick Allow overlap. This is important if you can have several frames on the same page. Unticking the box allows Writer to automatically resolve conflicts (not always in the best way because it does this horizontally and I’d like sometimes have it vertically).
    Also in the same tab, add some spacing to “detach” the frame from text. As your frame will alternate between left and right side of the page, you must specify both left and right because the “mirror” property is not forwarded to this tab.
  4. You can also customise Area and Borders.

Create a frame. DON’T TOUCH IT with the mouse, but immediately apply Mirrored style to it. Or insert your image and apply the style immediately. In any case, never move it or resize it with the mouse otherwise you’ll lose all properties (and benefit) of the style. In the case of images, prepare them before the insertion so that Writer uses them “as is”.

Thanks a lot for your answer. I will give it a try.

BTW, I did not mean “erratically” for the “to page” anchoring. I understand perfectly the effect of that mode. However, I was using the mouse to resize it and nudge images and frame to the desirable position. Now, I now better thanks to you.

Cheers,
Didier