-
Open the topic style sheet that you want to modify.
- In the local toolbar, make sure the first button displays
(which means that the Advanced view is currently shown in the editor). If the button displays
instead, then click it.
- In the upper-left corner of the Stylesheet Editor, make sure the Show Styles field
is set to Show All Styles.
-
From the area below, select the img tag. If you created classes of the tag, you can click the plus
button next to the img tag and select the class instead.
example
Let's say that you are creating a PDF manual that is 8 inches wide and you want to ensure that none of your largest images are wider than 6 inches. You can create a class of the <img> tag and name it "MaxWidth6Inches." For most of your images, you can use the parent <img> tag, but for the large ones, you can use the img.MaxWidth6Inches style class. The large images will automatically be resized if necessary so that they are no wider than 6 inches.
- From the Show Properties drop-down list
on the upper-right side of the editor, select Show: Property Groups.
- You can use the following steps to specify a precise width or height for the style. You can also specify a maximum or minimum width or height.
To set a precise width and/or height:
In the Properties section, click the plus button
next to Box to expand the group.
The property name is shown in the left column. The right column is used for selecting and entering values for the property.
To the right of height and/or width, click the down arrow and complete the fields in the popup. First you need to select Length in the top drop-down list. You can then enter a value in the lower-left area and choose from several different units of measurement (points, pixels, centimeters, etc.) in the lower-right area. See About Units of Measurement.Click OK when you are finished.
Note: When resizing images, you can ensure that the aspect ratio is maintained. For example, if you want certain images to be resized so that each is exactly 3 inches high, you can make sure that the width of each image is adjusted accordingly so that the picture stays in proportion. To do this, you would first set the height of the style at 3 inches. Then for the width property, you would select Automatic (instead of "Length") from the top drop-down list. In the same way, if you were to specify an exact width, you could maintain the aspect ratio by setting the height to "Automatic."
To set the maximum width and/or height:
If the original image is larger than the maximum width or height that is set, it will be reduced in size so that it is no greater than the maximum value. If the original image is smaller than the maximum width or height, it will not be resized.
In the Properties section, click the plus button
next to Unclassified to expand the group.
The property name is shown in the left column. The right column is used for selecting and entering values for the property.
To the right of max-height and/or max-width, click the down arrow and complete the fields in the popup. First you need to select Length in the top drop-down list. You can then enter a value in the lower-left area and choose from several different units of measurement (points, pixels, centimeters, etc.) in the lower-right area. See About Units of Measurement.Click OK when you are finished.
Note: When resizing images, you can ensure that the aspect ratio is maintained. For example, if you want certain images to be resized so that they are no more than 5 inches wide, you can make sure that the height of each image is adjusted accordingly so that the picture stays in proportion. To do this, you would set the maximum width of the style at 5 inches. You would then leave the maximum height property unspecified. In the same way, if you were to specify a maximum height, you could maintain the aspect ratio by not setting the maximum width property.
To set the minimum width and/or height:
If the original image is smaller than the minimum width or height that is set, it will be enlarged so that it is reaches the minimum value. If the original image is larger than the minimum width or height, it will not be resized.
In the Properties section, click the plus button
next to Unclassified to expand the group.
The property name is shown in the left column. The right column is used for selecting and entering values for the property.
To the right of min-height and/or min-width, click the down arrow and complete the fields in the popup. First you need to select Length in the top drop-down list. You can then enter a value in the lower-left area and choose from several different units of measurement (points, pixels, centimeters, etc.) in the lower-right area.See About Units of Measurement. Click OK when finished.
Note: When resizing images, you can ensure that the aspect ratio is maintained. For example, if you want certain images to be resized so that they are at least 2 inches wide, you can make sure that the height of each image is adjusted accordingly so that the picture stays in proportion. To do this, you would set the minimum width of the style at 2 inches. You would then leave the minimum height property unspecified. In the same way, if you were to specify a minimum height, you could maintain the aspect ratio by not setting the minimum width property.
- Press CTRL+S or click
to save your work.
If you want to use one group of settings for online output types (DotNet Help, HTML Help, WebHelp, WebHelp Plus, WebHelp AIR) and another group of settings for print output types (Adobe PDF, XHTML, Microsoft XPS, Microsoft Word, Adobe FrameMaker), follow the steps above for different style mediums. For example, you might use the "default" medium for your online outputs and you might use the "print" medium for your print outputs. See Creating Style Sheet Mediums and Associating a Medium with a Target.
To apply a particular style class to an image (after you create it in the Stylesheet Editor), simply right-click the image where it is inserted. Then from the menu, select Style Class and choose the appropriate style.
Note: Please be aware that if you are using percentage for the size of an object such as an image, the percentage refers to the block containing that image, not to the image itself. For example, if you have an image in a topic and set the width to 60%, this does not mean that the image will be reduced to 60% of its size. Instead, it means that the image will be resized so that its width is 60% of the "container" where it is inserted.