Autostep CopyPage Explanation

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 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 page number.

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 prASCopyPage 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 contains the other frames, apart from inside which had been added to the previous page.

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.

See the result for this sample
See the code to generate this sample

 

Home | Products | Services | Orders | Support | Forum | Partners | Site map | News
Copyright Mandix 1997-2004