Why can't I have different sized headers in writer?

What I need is an A4 document (.doc format) with 1.0 inch margins on every page, and a first page header with several lines of text, and a one-line default header on every other page.

I can get the first page header (format/styles and formatting), add text to both the first page header and the default header, and save this in .doc format.

However, whatever I do - including changing the margins (or not) - the default header text vanishes after I save and reopen. This doesn’t happen if the first page header is only one line, but it does if it is several lines long. Edit: nope, sometimes it does happen even with a one-line or blank first page header.

At first I thought it was because I kept changing the margins from 0.79 (default) to 1.0 but it happens even when I don’t go near the margins. I’ve played with the various options in page style: header, and sometimes the default page style window (format/page/page style: default style) has ‘show header’ unticked, but when I tick it and add a header and save and reopen the document, it just reverts back to no header and an unticked ‘show header’ option.

I thought I had figured out a way to save in .odt and then save as .doc, which didn’t erase the default header text, but now I can’t replicate it.

What am I doing wrong?

What happens when you save in odt-format?

Use page styles, especially if you are saving to a non-native file format, such as DOC. In particular use the First Page and Default Style page styles. You could use a custom page style for the body of the work instead of the Default Style, but this then requires the extra step of creating this style. In the example that follows I use the Default Style although it is often a good idea to create a custom style. Here are the basic steps required to create your document from scratch:

  1. Open Writer (new document).
  2. Modify the Default Style page style to have 72 pt / 1 inch margins and turn on header.
  3. Modify the First Page page style to have 72 pt / 1 inch margins and turn on header.
  4. Set the first page to use the First Page page style i.e., double click on this style.
  5. Insert your multiple lines of content in the header.
  6. Insert some filler text (if required) on the page.
  7. With the cursor at the end of the content on this first page, Insert > Manual Break… > Page Break > Style of “Default Style” > check Change page number and set the page number (e.g., to “2”) if required.
  8. Insert your single line of content in the header.
  9. Insert some filler text (if required) on the page.
  10. File > Save As… > File Type of “Microsoft Word 97/2000/XP/2003 (doc)”.

Those steps will produce a file like this one (rename from ODT to ZIP and extract contents). I have included an ODT version for comparison.

@oweng - In my case saving as a doc-format and opening the file again resulted in the lost of the 3 line header I created for page 1. Only the second line header remained for the first page and all the others.

Does this has to do with you using First Page and Default Page whereas I used only Default Page and unchecked “same content on first page” ?

That “same content on first page” option may be ODT-specific. I am uncertain of how it translates to the DOC specification and I generally do not trust these types of automation to be handled well between file formats. Assuming that the DOC spec does include a similar definition, then it would seem likely to be a bug (in LO). I used page styles because they are more likely to translate to a foreign file format, and in this case, apparently do.

Thanks for the explanations. In MS Word there is somethink like “same or different header than previous” thus I expected the "uncheck “same content on first page” " is the LibO equivalent.

I filed a bug report fdo#66363

I think that DOC option to dis/connect a header / footer with a previous header / footer is more likely to be related to section breaks, which in broad terms translate to page styles in ODT. I am not certain about this though. You may need to locate a similar “first page” type option that can be set in DOC.

Thanks for the discussion. I also can follow your “section break” argument. We just need to keep in mind that First Page and Default Page is needed to keep different headers/footer when saving in DOC format.

I made a test saving in doc-format and doc-format looses the different headers. I am using 4.0.4 on XP.
odt-format keeps the different headers.

I changed the setting for Default Style in the Styles and Formatting window.F11.

  • modify Default Style
  • enable header
  • uncheck “same content on first page”

and you should be done.

I entered 3 line of text in the first page header and a single line text for all other pages

Why do you want to save in doc-format?