Graphic scaling improvement is an enhanced feature that DITA Open Toolkit
1.3 provides. DITA OT 1.3 supports this feature in the transformation for
different outputs, such as HTML, XHTML, PDF, and FO. This feature is not applicable
in RTF output.
Note:
-
Because OASIS DITA 1.1 is not yet an approved standard as of the release
of DITA OT 1.3, the functionality described here should be considered a
preview capability.
-
The specification and the defined functions that need to be supported
can change by the time OASIS formally approves DITA 1.1.
To implement this feature, you must first meet the following prerequisites:
-
Install and configure the DITA Open Toolkit 1.3 successfully.
-
Ensure that the image file referred to by the
<image> tag
exists.
In DITA 1.1, there are some attributes that you can use to set the actual
display size of the pictures in the
<image> tag, such
as "width", "height", and so on.
You can set the actual display size of the image in the output by taking
the following steps:
-
Specify the height and width of the picture in the "height" and "width"
attributes of the
<image> tag, for example,
<image
height="80" width="60" href="a.jpg"/>
-
(Optional) Specify the metric of the length in the height and
width attributes fields, for example,
<image height="80pc" width="60pc"
href="a.jpg"/>. The metrics currently supported are: px, pc, pt,
in, cm, mm, em. The default is px.
Note:
If you do not specify the
metric of the length, the toolkit will use the default metric, px.
-
Run the transformation to generate the outputs, such as xhtml, HTML, and
FO, that support graphic scaling.
In the final output, you can see the image displayed in the size that
you expected. As in this example, the picture will be displayed by 80 pt in
height and 60 pt in width.
You can also use the scaling function in setting the actual display
size of the image in the output by taking the following steps:
-
Specify the height and width of the picture in the "height" and "width"
attributes of the
<image> tag, and the metric of the length.
-
Specify the scale rate in the scale attribute after you specify the height
and width for the image, for example,
<image height="80pc" width="60pc"
href="a.jpg" scale="0.8"/>. Scale="0.8" means the picture in the
output will be displayed at 80% of the size that you specified by height and
width.
-
Run the transformation to generate the outputs that support image scaling,
such as xhtml, HTML, and FO.
In the final output, you can see the image displayed in the size that
you expected. As in this example, the picture will be displayed by 64 pt in
height and 48 pt in width.