Implementation Considerations 10-5
If it looks like bad output, click Refresh on every frame before deciding that it is a problem with the template or the software.
10.9 Image Sizing Rules
There are a large number of factors that affect the size of the final exported image. The precedence of rules for how those factors work is as follows:
1.
Any images that the template specifies with the { graphic} macro are subtracted from the space available for graphics on that particular deck. In
general, you should be wary of templates that require images on every deck as they will eat into the overall amount of room available for document graphics.
2.
The SCCOPT_EX_GRAPHICBUFFERSIZE option, which is only used to reduce image size if necessary. It preserves the image aspect ratio.
3.
The SCCOPT_GRAPHIC_SIZELIMIT option, which is only used to reduce image size if necessary. It preserves the image aspect ratio.
4.
The SCCOPT_GRAPHIC_WIDTHLIMIT and SCCOPT_GRAPHIC_HEIGHTLIMIT options. These are only used to reduce image size if necessary. They preserve the
image aspect ratio, even if both are specified.
5.
Width= and height= parameters in the { INSERT} statement of the template. This reduces or enlarges the image to match the specified dimensions.
The image aspect ratio is changed if both are specified. The aspect ratio does not change if only one or none of these parameters is specified.
6.
Original image dimensions based on the information in the source file and the DPI setting, if applicable.
10.10 CSS Considerations
The styles discussed in this section relate only to script templates see Chapter 7,
Script Templates . Styles in Classic HTML Conversion templates see
Chapter 5, HTML Conversion Templates
are handled differently. One of the most powerful features of cascading style sheets CSS is the ability to
override the styles suggested in various ways. Dynamic Converter has designed its CSS support to permit users to override the style sheets that it produces. This, in turn,
enables the user to help blend documents from many authors into a collection that has a more unified look. In order to make this override work, one first needs to
understand style names.
In addition, it should be remembered that the output from Dynamic Converter might be placed into many HTML files. Special attention must be paid to ensure that LINK
REL=STYLESHEET HREF={ INSERT ELEMENT=Pragma.cssFile} statements are placed in the appropriate locations.
10.11 Style Names Used by Dynamic Converter
Style names are taken from the original style names in the source document. There is an inherent limitation in the style names the CSS standard permits. The standard only
permits the characters a-z, A-Z, 0-9, and dash - . Source document style names do not
Tip: You may find it simpler to empty and turn off caching in your
browser while creating and testing your templates.
10-6 Administrators Guide for Dynamic Converter
necessarily have this restriction. In fact, they may even contain Unicode characters at times. For this reason, the original style names may need to be modified to conform to
this standard. To avoid illegal style names, Dynamic Converter performs the following substitutions on all source style names:
■
If the character is -, then it is replaced with --.
■
If the character is not one of the remaining characters a-z, A-Z, or 0-9, then it is replaced by -xxxx where xxxx is the hexadecimal Unicode value of the
character.
■
If neither of the preceding situations is applicable, the character appears in the style name normally.
An example of one of the most common examples of this substitution is that spaces in style names are replaced with -0020. For a more complete example of this character
substitution in style names, consider the source style name My Special H1-Style with a space and an exclamation mark in its name. This would be transformed to
My-0020Special-0020H1--Style-0021.
While admittedly this system lacks a certain aesthetic, it avoids the problem of how the document looks when the browser gets duplicate or invalid style names.
Developers should also appreciate the simplicity of the code needed to parse or create these style names.
In addition, Dynamic Converter creates special list versions of styles. These have the same name as the style they are based on with --List appended to the end. These
styles differ from their original counterparts in that they contain no block-level CSS.
10.12 Overriding Dynamic Converter Styles