ReaderWmfCustomContentWidth Property |
Namespace: Ab2d
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:
CustomContentWidth must be set before reading metafile.