Page 1 of 2

Foot notes in exported documents?

Posted: Sat Nov 08, 2025 1:05 pm
by richmond62
Imagine, if you will, a routine to export the contents of a field to an RTF document . . .
-
SS 2025-11-08 at 13.22.08.png
-
(screenshot from my latest trick)

BUT, instead of 'just' exporting the contents of the field you want to APPEND a line that ALWAYS ends up at the end of the RTF document and in a small textSize, so this is NO GOOD:
-
SS 2025-11-08 at 13.25.44.png
-
BUT, the same text should be resized AND at the bottom of one's A4 / US letter size document ready for printing:
-
SS 2025-11-08 at 13.30.44.png

Re: Foot notes in exported documents?

Posted: Sat Nov 08, 2025 1:52 pm
by Klaus
Hi Richmond,

I'm afraid this can only be done by manipulating the raw rtf text before exporting.

Best
Klaus

Re: Foot notes in exported documents?

Posted: Sat Nov 08, 2025 2:25 pm
by richmond62
I'm afraid this can only be done by manipulating the raw rtf text before exporting.
Well, I have nothing against that, but I am not sure how to do that.

Adding a header is dead easy, and adding some text directly after the text to be exported is also dead easy.

What is NOT so easy is to append a line of text in such a way that when an RTF document is exported it lands up at the bottom of the page.

Re: Foot notes in exported documents?

Posted: Sat Nov 08, 2025 2:44 pm
by Klaus
What si NOT so easy is to append a line of text in such a way that when an RTF document is exported it lands up at the bottom of the page.
Yep, exactly what I was thinking!

Re: Foot notes in exported documents?

Posted: Sat Nov 08, 2025 3:00 pm
by stam
I've not tested, but how about manipulating the htmlText of the field and then exporting to RTF?

I would imagine it's possible to lock screen, add a line at the end, style it with html, export it, delete the last line and unlock screen or some such.

Re: Foot notes in exported documents?

Posted: Sat Nov 08, 2025 3:05 pm
by Klaus
Good idea!
As long as LCs thml implementation supports the "footer" tag.

Re: Foot notes in exported documents?

Posted: Sat Nov 08, 2025 3:08 pm
by richmond62
One of my favourite pieces of software:

https://wordsearchcreator.org/downloads/

does what I'd like to do:
-
SS 2025-11-08 at 16.06.18.jpg

Re: Foot notes in exported documents?

Posted: Sat Nov 08, 2025 3:11 pm
by Klaus
Can't see any relation to your problem? :shock:

Re: Foot notes in exported documents?

Posted: Sat Nov 08, 2025 4:14 pm
by richmond62
Klaus, please don't start on about 'my problem' as that's a personal matter between me and my psychiatrist. 8)

The screenshot of the document produced by the wordsearch software illustrates EXACTLY what I wish to achieve.

Re: Foot notes in exported documents?

Posted: Sat Nov 08, 2025 5:03 pm
by Klaus
Oops, sorry, did not scroll, so I didn't see the "footer".

OK, Wordsearchcreator can do it, but that does not help you, or does it?
Did you try with HTML text?

Re: Foot notes in exported documents?

Posted: Sat Nov 08, 2025 5:35 pm
by richmond62
that does not help you
No, indeed, it does not, but I thocht I'd just bung that in as an example of some software that did what I want to do, forbye.

I suppose one could 'go round the houses' via HTML to RTF . . . off for a fiddle around.

As far as I recall LC only copes with a reduced subsection of HTML code.

Re: Foot notes in exported documents?

Posted: Sat Nov 08, 2025 11:10 pm
by SparkOut
Here's an approach you might find actually quite simple (for some definition of simple)

Create a template rtf file with the header and footer layout you want.
In the places you want content generated from your app to be inserted, put a placeholder label surrounded by doubled square brackets.
After you have created the rtf file, open it in a text editor. Make sure your placeholders are surrounded by the [[ ]] markers, it could be that the rtf formatting code has inserted itself between the square brackets and the placeholder label, so if necessary, move the brackets to the correct place immediate surrounding the placeholder label.

If you want, you can import the template as a "binfile" and set a custom property to that data, for simple portability, assuming you don't regularly want to edit the template layout/styling.

Put your desired content into variables named to match the placeholders, and call the merge function. Export the returned content to another binfile and you will have an rtf document with headers and footers. The styling of the headers and footers from LC may not translate very well, at least colours anyway, I noticed. I'm sure more analysis of the rtf format would reveal a better way, but it might be easier to style the header and footer in the template as you wish, then leave the variable content from LC to merge as plain text, and inherit the styling from the document. The body rtf text should cope with most... I think. I've not tested exhaustively.

Re: Foot notes in exported documents?

Posted: Sat Nov 08, 2025 11:12 pm
by SparkOut
Content in LC.png
RTF template.png
RTF template.png (5.52 KiB) Viewed 224 times
placeholder brackets surround label.png
placeholder brackets surround label.png (10.08 KiB) Viewed 224 times

Re: Foot notes in exported documents?

Posted: Sat Nov 08, 2025 11:14 pm
by SparkOut
RTF output.png

Re: Foot notes in exported documents?

Posted: Sun Nov 09, 2025 1:28 pm
by richmond62
Tried appending this:

<footer>
<p>© 2025 MyWebsite. All rights reserved.</p>
</footer>

to HTML export and got nowhere:
-
SS 2025-11-09 at 14.31.43.png
SS 2025-11-09 at 14.31.43.png (10.8 KiB) Viewed 155 times