Skip to content

TallComponents.UnoPdf.Client

TallComponents.UnoPdf.Client.Models.Pdf.Shapes

MetafileShapeModel Class

A shape containing a metafile (emf or wmf) vector based image.

csharp
public class MetafileShapeModel : TallComponents.UnoPdf.Client.Models.Pdf.Shapes.ContentShapeModel

Inheritance System.Object 🡒 ShapeModel 🡒 ContentShapeModel 🡒 MetafileShapeModel

Remarks

In XML you can specify the metafile image data as Base64 encoded data.
<example>
You can convert an image file to Base64 using the .NET method <see cref="M:System.Convert.ToBase64String(System.Byte[])"/>.
<para>C#</para><code>
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 );
}
</code></example>

Properties
HeightThe height of the metafile image.
KeepAspectRatioIf 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.
PathRelative or absolute path to the folder containing fonts. Leave empty to use the system font folder. (default = empty)
WidthThe width of the metafile image.