• Products
  • Pricing
  • Documentation
  • Support
Login
Your cart is empty. See pricing.
My order
Total:
Order
  • Home
  • Products
  • Pricing
  • Documentation
  • Support
Login
LinkedIn
Twitter
  • Guide
  • API reference
  • Code samples
  • Changelog
  • TallComponents
  • TallComponents.Licensing
  • TallComponents.PDF
  • TallComponents.PDF.Actions
  • TallComponents.PDF.Annotations
  • TallComponents.PDF.Annotations.Markups
  • TallComponents.PDF.Annotations.Widgets
  • TallComponents.PDF.Brushes
  • TallComponents.PDF.Colors
  • TallComponents.PDF.Diagnostics
  • TallComponents.PDF.DigitalSignatures
  • TallComponents.PDF.DynamicXfa
  • TallComponents.PDF.Extensions
  • TallComponents.PDF.Fonts
  • TallComponents.PDF.Forms.Data
  • TallComponents.PDF.Forms.Fields
  • TallComponents.PDF.Forms.Fields.Barcodes
  • TallComponents.PDF.Forms.Fields.Barcodes.Properties
  • TallComponents.PDF.JavaScript
  • TallComponents.PDF.JavaScript.Scripting
  • TallComponents.PDF.JavaScript.Scripting.Soap
  • TallComponents.PDF.Metadata
  • TallComponents.PDF.Navigation
  • TallComponents.PDF.Pens
  • TallComponents.PDF.Prepress
  • TallComponents.PDF.Printing
  • TallComponents.PDF.Security
  • TallComponents.PDF.Shapes
  • TallComponents.PDF.Shapes.Annotations
  • TallComponents.PDF.Shapes.Barcodes
  • TallComponents.PDF.Tags
  • TallComponents.PDF.TextExtraction
  • TallComponents.PDF.Transforms

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.

Events

GetWebCredentials
Occurs when a metafile is loaded from a web location to retrieve the credentials.
Our products
PDFKit.NET 5.0
Create and manipulate PDF documents
TallPDF.NET 5.0
Generate PDF on the fly
PDFRasterizer.NET 4.0
Render PDF pages cross-platform
Support resources
  • Code samples
  • Submit issue
  • Contact
  • Licensing Model
Legal
  • EULA
  • Privacy
LinkedIn
Twitter
© 2001-2025 TallComponents BV. All rights reserved.