Not sure if this is possible, but I'm trying to save text through text output in RTF with special encoding.
Everything works for me, except for the total number of pages.
I want him to say “Page x of y,” at the bottom of each page, for example, “Page 1 of 3,” but I cannot find the correct code for the general page number.
Some say they use \nofpages , but the source says that using \nofpagesN is to indicate the number of pages in a document. Is there a formula or something that I can use, or perhaps a way to put the last page number? Here is an example of my code, if you put it in an rtf file via notepad, then save and open in a text box or word, you will see what I mean:
{\ rtf1 \ pagestart1 {\ header \ brdrt \ brdrth \ ql \ b Name: \ b0LAST, FIRST \ par \ b DOB: \ b0 1979/11/03 \ par \ b Service Date / Time: \ b0 2012/03 / 06 00:49:00 \ par \ b MRN: \ b0 XXXXXX \ par \ b Order Date / Time: \ b0 2012/03/05 01:14:00 \ par \ b Study ID: \ b0} \ par {\ footer \ pard \ brdrt \ brdrs \ qc \ fs16 \ b \ ul CONFIDENTIALITY NOTICE \ par \ par \ pard \ brdrt \ brdrs \ keepn \ ql \ fs20 Date: \ chdate \ par \ keepn \ qc \ fs20 Page \ chpgn of \ nofpages \ par} \ b Study ID: \ b0 000000000000 \ par \ pard \ brdrb \ brdrth A bunch of text to make up more than one page. \ par \ par \ par {\ footnote \ pard \ b Some stuff in the footer \ b0 \ par}}
source share