Foot notes in exported documents?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
richmond62
- Livecode Opensource Backer

- Posts: 10220
- Joined: Fri Feb 19, 2010 10:17 am
Foot notes in exported documents?
Imagine, if you will, a routine to export the contents of a field to an RTF document . . .
- -
(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:
- -
BUT, the same text should be resized AND at the bottom of one's A4 / US letter size document ready for printing:
-
- -
(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:
- -
BUT, the same text should be resized AND at the bottom of one's A4 / US letter size document ready for printing:
-
Re: Foot notes in exported documents?
Hi Richmond,
I'm afraid this can only be done by manipulating the raw rtf text before exporting.
Best
Klaus
I'm afraid this can only be done by manipulating the raw rtf text before exporting.
Best
Klaus
-
richmond62
- Livecode Opensource Backer

- Posts: 10220
- Joined: Fri Feb 19, 2010 10:17 am
Re: Foot notes in exported documents?
Well, I have nothing against that, but I am not sure how to do that.I'm afraid this can only be done by manipulating the raw rtf text before exporting.
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.
Last edited by richmond62 on Sat Nov 08, 2025 2:58 pm, edited 1 time in total.
Re: Foot notes in exported documents?
Yep, exactly what I was thinking!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.
Re: Foot notes in exported documents?
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.
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?
Good idea!
As long as LCs thml implementation supports the "footer" tag.
As long as LCs thml implementation supports the "footer" tag.
-
richmond62
- Livecode Opensource Backer

- Posts: 10220
- Joined: Fri Feb 19, 2010 10:17 am
Re: Foot notes in exported documents?
One of my favourite pieces of software:
https://wordsearchcreator.org/downloads/
does what I'd like to do:
-
https://wordsearchcreator.org/downloads/
does what I'd like to do:
-
Re: Foot notes in exported documents?
Can't see any relation to your problem? 
-
richmond62
- Livecode Opensource Backer

- Posts: 10220
- Joined: Fri Feb 19, 2010 10:17 am
Re: Foot notes in exported documents?
Klaus, please don't start on about 'my problem' as that's a personal matter between me and my psychiatrist.
The screenshot of the document produced by the wordsearch software illustrates EXACTLY what I wish to achieve.
The screenshot of the document produced by the wordsearch software illustrates EXACTLY what I wish to achieve.
Re: Foot notes in exported documents?
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?
OK, Wordsearchcreator can do it, but that does not help you, or does it?
Did you try with HTML text?
-
richmond62
- Livecode Opensource Backer

- Posts: 10220
- Joined: Fri Feb 19, 2010 10:17 am
Re: Foot notes in exported documents?
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.that does not help you
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?
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.
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.
- Attachments
-
- RTFmerge.zip
- (11.61 KiB) Downloaded 8 times
Last edited by SparkOut on Sun Nov 09, 2025 5:10 am, edited 2 times in total.
-
richmond62
- Livecode Opensource Backer

- Posts: 10220
- Joined: Fri Feb 19, 2010 10:17 am
Re: Foot notes in exported documents?
Tried appending this:
<footer>
<p>© 2025 MyWebsite. All rights reserved.</p>
</footer>
to HTML export and got nowhere:
-
<footer>
<p>© 2025 MyWebsite. All rights reserved.</p>
</footer>
to HTML export and got nowhere:
-