Hello,
I've been saving a .doc template as a .rtf, then I open it in LC and paste it in a field by setting its RTFText property. Then I use both Text and HTMLText to modify the text, parse, replace, put format, etc. Finally, I print the results as a PDF by using revPrintField. It works well so far. I'm doing very basic editing and formatting. However, the header/footer and double column is not properly displayed in the field. Any ideas how can I extract the header, body and footer, work with them and properly print them as a PDF? Thanks!
Monox.
How to get the header/footer in a .rtf file?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
How to get the header/footer in a .rtf file?
Monox
Developing a Cyber Physical System.
https://www.monoxware.com/
Developing a Cyber Physical System.
https://www.monoxware.com/
Re: How to get the header/footer in a .rtf file?
I would use revPrinText this way:
########CODE#######
put the text of field "myLongText" into textToPrint
put "Left Header" & TAB & "Cetral Title" & TAB & "Right header" into MyHeaders
put "Left Footer" & TAB & "Central Footer" & TAB & "<%pageNumber%> / <%numPages%>" into myFooters
revPrintText TextToPrint,MyHeaders,MyFooters
#####END OF CODE#####
And your text may be formatted as you like and livecode automatically split and create the pages.
This is a result:

########CODE#######
put the text of field "myLongText" into textToPrint
put "Left Header" & TAB & "Cetral Title" & TAB & "Right header" into MyHeaders
put "Left Footer" & TAB & "Central Footer" & TAB & "<%pageNumber%> / <%numPages%>" into myFooters
revPrintText TextToPrint,MyHeaders,MyFooters
#####END OF CODE#####
And your text may be formatted as you like and livecode automatically split and create the pages.
This is a result:

Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w