See the result
for this sample
See the code to generate this sample
Line 1 When the DLL is entered initially, a dcoument
is created which sets the inside frame to be the whole page. AddFirstPage
over-rides these defaults so long as nothing has already been
added to the document. In this example both a header and a footer
Line 2 To put anything into the header frame, it must first be
set as the current frame.
Line 3 ParaText draws the sepcified text within a recatngle.
It uses embedded commands to control the formatting. <ce>
specifies centered text whilst <pg> includes the current
Line 4 The metafile from the specified external file is loaded
and scaled to fit within the sepcified rectangle.
Line 5 The inside frame is re-selected
Lines 6 & 7 The outline of the inside frame is specified
to be drawn in blue.
Line 8 This loop executes a series of AddTextAt methods. The
y position is omitted so that each call uses the value updated
from the previous one, beginning with the start value of y = 0.
The alignment is left by default and the prASInside is selected
so that when the bottom of the frame is reached, a new page is
added and the text output continues at its top line. With this
option, the new page also copies the header and footer contents.
Line 9 Finally, the document is complete and, by default, EndDocument
displays the result in the preview window, allowing the user to
review it or print it as desired.