Click or drag to resize
ReaderWmfCustomContentHeight Property
Gets or sets the height that is used to set the custom width of the read objects. Default value is 0 that means that the height defined in metafile is used.

Namespace: Ab2d
Assembly: Ab2d.ReaderWmf (in Ab2d.ReaderWmf.dll) Version: 7.1.5512.1040
Syntax
C#
public double CustomContentHeight { get; set; }

Property Value

Type: Double
Remarks

By default the size of the read content is defined in the metafile. It is specified in GDI device units which means that usually the size of a metafile is a few thousands x a few thousands (for example for page copied from Microsoft Word the metafile size is 4253 x 4871). Because the read metafile is returned as Viewbox or Image the size of the metafile does not affect the size of the shown elements because it is controlled by the Width and Height of Viewbox or Image. Width and Height of Viewbox or Image can be set with Width or Height properties.

But sometimes it is unpractical to deal with sizes in thousands and font sizes in hundreds when you need an 20 x 20 image. In this case CustomContentWidth or CustomContentHeight can be set to specify how big the content size will be regardless of the size defined in metafile.

When only the CustomContentWidth or only the CustomContentHeight is defined, the aspect ratio of the read objects is preserved. For example if only CustomContentWidth is set to 100, the used CustomContentHeight will be calculated from the actual metafile size and the specified CustomContentWidth.

When both CustomContentWidth and CustomContentHeight are set, the specified width and height are used regardless of the aspect ratio.

NOTE:
CustomContentHeight must be set before reading metafile.

See Also