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
are created.
Line 2 The inside frame is current by default so this specifies
that its border is to be shown.
Line 3 The text to be displayed is read from an external file
and stored internally as a string.
Line 4 The first page has already been created so set up a flag
to avoid creating it again.
Line 5 Continue to add text until the string is empty.
Line 6 Set flag so that pages are added in subsequent loops.
Line 7 If this is not the first time around, add a new page,
copying the details from the previous page.
Line 8 ParaText flows a text string into a rectangle. The part
of the text which remains at the end of the frame is returned
so that further calls can continue the process. The dimensions
of the rectangle are omitted, in which case the current position
is used as the top left corner as well as the frame width and
height.
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.