Printing multiple pages with different header numbers

I am trying to print five A4 sheets, each with a header that has a number on it. I need to do this 25 times with a different number in that header (so, five sheets with the number 1, five sheets with the number 2, etc.) I can do this by manually changing the header between each print run but it is of course quite time-consuming. I’m wondering if there’s a better way - kind of like an instruction to “set header_num = copy_num”?

Edit: sorry @PKG but I may have explained this badly. It’s for a trivia night and I’m pre-filling the table numbers. The five sheets are all unique (so sheet 1 is round 1/2, sheet 2 is round 3/4, …) and I need 25 copies of each quintet, each with different numbers from 1-25.

Number 25 pages (1-25) once and print 5 copies.

2 Likes

If you are a bit familiar with mail merge you could easily create a calc sheet with quintets of numbers from 1-25 and set the calc sheet as data source. See attached file.


QuintetsFrom1-25.ods (11.6 KB)

Sorry, I don’t think I was clear with what I needed - hopefully my edit helps!

Then give a formal specification for the sheets, possibly with an example.
And since you know how to edit your question, add OS name, LO version and save format.

Well, I don’t still understand. Could you explain a little bit more - sharing a sample file?
IMO a mail merge approach could be helpful (?).

Unfortunately I can’t edit the post any more - must have a 24-hour limit on it.

Running 24.2.5.2 on Win11 with .odt format. Sample file attached - basically I’d like a way to print off one copy of the five sheets, all with the header “Table 1”; one copy that reads “Table 2”, and so on, without needing to manually change the header each print run or creating a document that is 125 pages long.

@Grantler Unfortunately I’m not familiar with mail merge, this needs to be done by Saturday (UTC+13) so will I have time to learn?
sample.odt (11.5 KB)

I still don’t understand. Do you want 25 copies of the sample file (showing “Round 1 to 5”)? Or do you want 5 copies of rounds 1-25?

Anyway @PKG’s solution is the simplest: create the base document and print as many copies as needed.

PS: it looks to me that using Calc would probably make design easier (unless you’d like to have formatted text in the cells).

Then someone has to explain it to them, and the result could look like this.

Quiz.odt (33,3 KB)

I understood it this way (see uploaded file):

Quintets_Tables.odt (35.8 KB)

Although your sample document didn’t show the numbering 1 - 25, I assume from the question that you want it shown on the document. Effectively, you want 125 sheets with both sets of numbers making 125 uniquely numbered documents.
With mail merge it is easy to add names for regulars if your trivia quiz is run as an ongoing competition so I have added a field for them also.
Below there is

  • a spreadsheet with numbers and a column for names
  • the set of 5 sheets for each group as a Writer document with fields inserted
  • An instruction sheet on how to register the spreadsheet as a database, how to use the fields and how to print
    Put all three in the same folder

TriviaGroups.ods (11.0 KB)
TriviaQuestions.odt (13.4 KB)
TriviaQuestionsMailMergeInstructions.odt (74.0 KB)
Let me know if you have any questions. Cheers, Al

I’ve had a look at the mail merge solution, and it’s exactly what I need - PKG your interpretation of what I wanted it to look like was the correct one. EarnestAl and Grantler put me on the path towards learning mail merge, so thank you - job is done and everything is printing off as we speak.

Thank you all!

2 Likes

Please be so kind and upload a part (file) of the solution. Thanks.

@PKG’s answer is the simplest, safest and correct solution. I recommend it.

However if you feel like exploring more exotic ways, here are a few suggestions. They make sense when you are not printing stationery but have some text in your pages (I mean an argumentation developing over several pages; in other words, your text is not a constant repeating on every page).

Use heading numbering

Create a Heading 1 paragraph containing at least a space (so that it is not considered empty by Writer which would then eliminate it for [wrong IMHO] compatibility with M$ Word).

Customise Heading 1 so that it is preceded by a page break (in Text Flow tab). Set font colour the same as your background in Font Effects tab (this is usually white to print white characters on white background). Change font size to 2pt in Font tab (this is the minimum allowed by Writer). Make sure that spacing above and below is 0cm in Indents & Spacing tab.

Enable Tools>Heading Numbering for level 1.

In your page header, Insert>Field>More Fields, Document tab, Type Heading (was Chapter in older releases), Format Heading Number, Up to level 1.

As long as you don’t change the “chapter”, the number remains the same. To change the number, insert a new blank (= containing one space) chapter heading.

Several variations are possible.

  • The type of number can be alphabetical, Roman, … Select the appropriate setting in the heading numbering dialog.
  • Instead of “numbering” your pages, you can have any text. In this case, your chapter heading is not a space but the text you want. Field insertion then selects Heading contents instead of number.

Note that this interferes with chapter numbering if you use the feature. It is dealt with by offsetting your current chaptering by one level. You can do it in a single operation with the Navigator.

Using several page styles

This makes possible to have different orientations (landscape and portrait) and independent headings among others. However it is less automatic and may not give your expected results if you reuse a previous page styles. The “best” counter-example is alternating Left Page and Right Page styles where all left pages bear the same number as do the right pages.

In this approach, you create one page style per sequence. Numbering is done by a Number range. This is an internal counter which value changes every time you reference it.

In the header of every page style, Insert>Field>More Fields, Variables tab, Type Number range. On first insertion, create a new counter by entering a new Name and Insert. Of course, you can use a built-in counter if you don’t use it already in your document. On subsequent insertion, Select the counter and Insert.

It works because presently a page header is computed and cached the first time it is met in Writer. I consider this behaviour as faulty because it has many adverse consequences when trying to share variable values between text and header/footer. However, it gives the result you expect. Note that if my request for change is ever accepted and implemented, it will stop working.