Copying Files: { COPY} Macros

7-28 Administrators Guide for Dynamic Converter

7.4.12 Copying Files: { COPY}

The { COPY} macro is used to copy extra, static files into the output directory along with the output from the converted document. For example, if you have added a company logo that was not in the original input document, { COPY} can be used to make it a part of the converted output document. Other examples include graphics used to mimic buttons for navigation, outside CSS files, or a piece of Java code to be run. Syntax { COPY FILE=file} SCCOPT_EX_GRIDCOLS This option specifies the number of columns that each template grid applicable only to spreadsheet or database files should contain. Setting this option to zero 0 means that no limit is placed on the number of columns in the grid. SCCOPT_EX_GRIDADVANCE This option specifies how the previous and next relationships will work between grids. ■ ACROSS : The input spreadsheet or database is traversed by rows. ■ DOWN : The input spreadsheet or database is traversed by columns. This option has no effect on updown or leftright navigation. SCCOPT_EX_GRIDWRAP This option specifies how the previous and next relationships work between grids at the edges of the spreadsheet or database. Consider a spreadsheet that has been broken into 9 grids by HTML Export as follows: If this option is set to TRUE, then the Grids.Next.Body value after Grid 3 will be Grid 4. Likewise, the Grids.Previous.Body value before Grid 4 will be Grid 3. If this option is set to FALSE, then the Grids.Next.Body after Grid 3 will not exist as far as template navigation is concerned. Likewise, the Grids.Previous.Body before Grid 4 will not exist as far as template navigation is concerned. In other words, this option specifies whether the previous and next relationships wrap at the edges of the spreadsheet or database. Option Description Script Templates 7-29 The { COPY} macro may occur anywhere inside a template. If the { COPY} is inside a { IF}, then the { COPY} will only be executed if the condition is TRUE. In { REPEAT} loops, the { COPY} will only be performed if the loop is executed one or more times. In addition, if the { REPEAT} loops more than once, Dynamic Converter detects this and the { COPY} is executed only once. As its name suggests, the { COPY} macro is a straight file copy. Therefore, no conversions are performed as part of the copy. For example, graphics formats are not changed and graphics are not resized. Template authors should also remember to use { GRAPHIC} when graphics and other files are copied so that space will be created for the external graphic in the text buffer size calculations. Since the only action Dynamic Converter takes is to copy the requested file, it is up to the template author to make use of the copied file at another point in the template. For example, a graphic file may be copied and then the template can use an img tag which references the copied graphic. The following snippet of template code would do this: { copy FILE=Picture.JPG { graphic PATH=Picture.JPG} img src=Picture.JPG

7.4.13 Deprecated Template Macros