How to print signature in a form dynamically based on the contents

I have a requirement to print signature image dynamically on the last page before the common footer.
The Signature should Print on the last page before the common footer.

For example, if the contents expand to 2 pages if there is space to print signature then it should print on the 2nd page.
If the 2ndpage contents exactly completes before the footer, then Signature should not print in 3rd page without any contents.it should bring some 2 lines from page 2 and print it on 3rd page and then the signature should print before the common footer.

Pls help me on this.

Please edit your question to mention OS name, LO version and save format. Don’t use a comment, this is not a forum but a Question&Answers site.

The only way I found was to make your signature image the last “character” of the last paragraph.

I suggest you create a frame style for ease of application and later tuning. You access frame styles clicking on the third icon from left in the style sidepane toolbar.

  • create a new style (right-click anywhere and New)
  • name it Signature
  • in Type tab:
    • Anchor As character
    • Position Vertical Bottom relative to Base line
  • Wrap tab: untick Allow overlap (it shouldn’t matter, but make sure)

At the end of your last paragraph, type Shift+Enter to add a line break. A line break does not terminate a paragraph; you remain in the current paragraph.

Insert your signature image. The image is selected (handles are displayed around it). Style it Signature by double-clicking on the style name.

To achieve your requirement, the Text Flow tab properties for the last paragraph must be modified:

  • Widow control (the parameter active at top of page) is set at 3 = 2 lines of text + the “line” for the signature image
  • you may need to also adjust Orphan control to avoid creating too high a space at bottom of previous page; experiment.

Note that using a line break prohibits “fancy” signature positioning because it is considered as a (huge) character managed by text flow, i.e. it is laid out at beginning of line. In case your last paragraph is your name and function, you can play with alignment parameters in the specific paragraph style (there is a dedicated built-in Signature paragraph style for that) to center everything.

Note also that my recipe is likely to work only with .odt save format as DOCX has no notion of frame style.

EDIT 2023-02-14 Flush signature to next page with last table row

I am afraid this can’t be done in Writer. It looks like your document is dynamically generated from some database. You then could perhaps use Base which has a report generator which might be better fit to the task.

If your document is generated, it would anyway need some manual step with Writer. My best attempt added an extra auxiliary column to the table so that I could anchor a “signature frame”.

I first attached the frame to the very last cell (meaning this has to be done manually because you don’t know in advance the last row). To try to eliminate this manual step, I then added the frame to every row, relying on Allow overlap property to overlay all frames. It works fine if the table is only one page long but gives spurious “signature” on every page otherwise.

Unfortunately, the frame can still overlay the table. The reason for this failure is table and frames live in different spaces. They interact with main text flow but not between them. This means the frame does not “see” that page area is occupied by the table and positions itself only relative to ordinary text (outside the table) and advertises its position only to text not to table.

I played with all possible attributes; frames and tables definitely don’t interact.

See my sample file: AskLOAutoSplitTable.odt (13.4 KB)

Thank You. We have a requirement as follows.

In Page 1:
We have to print a dynamic overflow table.
Employee ID Employee Name

We have used fields which gets input from JSON file and prints the Employee ID and Employee Name.

If the Employee table has more values from input, then it overflows to Page 2 3 4…based on the input.
if it ends in Page 2 and if we have space after that to accommodate signature we have to print. if not, we have to take last value of the Employee ID and Employee Name to page 3 and then print the Signature before common footer.

Signature position is fixed and to be printed before common footer.

Can you pls help in this requirement.