Namespace TallComponents.PDF.Shapes
Class MetafileShape
A shape containing a metafile (emf or wmf) vector based image.
In XML you can specify the metafile image data as Base64 encoded data.
You can convert an image file to Base64 using the .NET method . C# string base64Data; using ( FileStream fs = new FileStream( fileName , FileMode.Open ) ) { byte[] bytes = new byte[ fs.Length ]; fs.Read( bytes, 0, bytes.Length ); base64Data = Convert.ToBase64String( bytes ); }
Syntax
public class MetafileShape
: ContentShape
Constructors
MetafileShape()
Creates a new MetafileShape (emf or wmf).
MetafileShape(Stream)
Create a new MetafileShape (emf or wmf) from a stream of binary data.
MetafileShape(String)
Create a new MetafileShape (emf or wmf) from a relative, absolute or virtual path.
Properties
String FontPath
Relative or absolute path to the folder containing fonts. Leave empty to use the system font folder. (default = empty)
Double Height
The height of the metafile image.
Boolean KeepAspectRatio
If KeepAspectRatio is set to true, the height is calculated from the
width so that the width/height ratio is equal to the ratio of the original metafile image.
If set to false, the specified width and height are used and the metafile image will in general appear distorted.
String Path
Relative or absolute path of metafile image file.
Double Width
The width of the metafile image.