How to add header without breaking document layout?

Every time i add something into header in Writer it moves text down. How to edit headers without breaking page margins?

To use fixed size header/footers, got to the Header or Footer tab of the page style (either right-click on the style name in the styles panel or FormatPage... for direct formatting).

Uncheck AutoFit height and set the required height in the box labelled Height.

Header/footer text will be clipped to this fixed area.

With Use dynamic spacing unchecked, set Spacing to the amount of space between the bottom of the header area and the top of the text area (or the symmetric spacing for the footer).

You may have to experiment with setting the top and bottom margins to position exactly your header/footer where they are expected to be.

Left/right margins are less difficult to set: the page style margins define the overall presentation. Paragraph-global indent spacing is set with paragraph-local margins (aka. Before text and After text).

If this solves your question, please check the tick mark at left and close the question. If you are satisfied with the answer, be kind enough to upvote it.

That’s a bit complicated. And still, even then, wouldn’t you need to print a document many times to adjust it with ruler?

I found a bug
https://bugs.documentfoundation.org/show_bug.cgi?id=33304

You can’t. Or rather, you don’t break the page margins. Page margins are the space surrounding the text on a page, including headers and footers. IIRC headers and footers are put in the margins in MS Word, but in Writer they belong to the text, and therefore they don’t sit in the margins. So, when you intend to have headers and/or footers in your document, and you are finicky about the exact formatting, make sure to enable them as soon as possible. That way you won’t be unpleasantly surprised when your text starts moving across pages because there’s less room for it.

Moreover, don’t rely on manually inserted void paragraphs to achieve layout, just like at typewriter era. If a user changes paper format (say from A4 to Legal), this will surely break your layout. Prefer the outline styles (Heading x), paragraph style indents & spacing, text flow attributes (keep with next paragraph, don’t split paragraph), … so that the relationship between paragraphs is kept as you intended even if geometric printer factors are changed.

The law specifies how much document body should have a margin from the edge of the page. In exact millimeters. Not less, not more. Headers and footers have own rules. With this system it’s simply impossible to make a document that comply with the law. 1 mm out of standard and document is legally invalid.

Should i then file a bug?

If it is a matter of overall dimensions (mainly margins and header/footer sizes), I think designing a template with page, paragraph, character styles is enough. Since the document is produced in legal context for a definite audience (restricted to a single country), it is then highly unlikely that somebody will fancy to change any parameter. As I better understand your concern, see my answer.

Hi

Maybe I do not understand the question correctly, but you can set a fixed size for the headers (and footers): FormatPageHeader tab▸untick AutoFit height▸set Height.

If the typed text is too big for the area, a small red triangle at the right-end of the header indicates that the text continues.

Regards