10-4 Administrators Guide for Dynamic Converter
10.7 Relative URLs in Templates and Layout Files
Consider the following image tag: IMG SRC=image.gif. In most implementations of Dynamic Converter, it is likely that the output files will end up in
a different location than the template files. If the developer uses the template above in this scenario, the output files produced will have a reference to image.gif, which the
browser will assume has the same path as the output files. The problem is that image.gif is likely to be back in the directory where the template file is located. This is a
problem for anything referenced in the template using a relative URL. There are several possible solutions to this problem.
Solution 1: Ensure That the References Are Good
If the developer knows exactly which files all of the templates reference, the correct files such as image.gif can be moved to or located in the output directory or
directories. This solution requires the developer to have exact knowledge of the contents of the templates, and may propagate the same set of files into many output
locations.
Solution 2: Use Absolute URLs
The developer can design templates to contain absolute URLs to any referenced files. The template in the example would then look something like this.
HTML BODY
PIMG SRC=http:www.company.comtemplatesimage.gifP { INSERT ELEMENT=Sections.1.Body}
BODY HTML
If HTTPWEBROOT is used instead, you eliminate the problem of output files tied to a specific domain.
Solution 3: Make Path Statements in a Separate File
The developer can create a separate Idoc Script file that states the path, for example: dynamichtml Image_DirHttpWebRootgroupspublicdocumentsgraphicend
The developer can then load the Idoc resource and reference the path statement from the included Idoc Script file as follows:
img src=include Image_Dirlogo.gif All long as the graphics or related files are checked in with the security group and
document type to match the stated path in this example, a security group Public and a document type Graphic, then the paths will resolve, and the page will display
properly.
10.8 Browser Caching
In the process of building and debugging templates, you are likely to run the same source file through Dynamic Converter repeatedly with slightly different templates.
Depending on how you are naming the output files, this may have a tendency to produce the same set of file names repeatedly. In this scenario, especially if the output
is being read directly from a file system and not through a web server, browsers will have the tendency to show the old cached results and not the new ones.
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