Visit Gigasoft's Web Site
 ProEssentials v9 Help

PEcopyemftofile Method

Scope All ProEssentials Interfaces

 

PEcopyemftofile (nWidth As Integer, nHeight As Integer, szFilename As String, nEmfType As eEmfType, nEmfDC As eEmfDC, bEmfBitmapGradients As Boolean) As Boolean

 

Parameter

Description

nWidth

Width in 1/100th millimeters. The dimensions must not equal zero. To insure image quality, the aspect ratio (width/height) must be between 0.333 and 10.0

nHeight

Height in 1/100th millimeters. The dimensions must not equal zero. To insure image quality, the aspect ratio (width/height) must be between 0.333 and 10.0

szFileName

Must identify a valid filename.

nEmfType

PEET_EMF_GDI (0)

Legacy GDI enhanced metafile, converted via GDIPlus to simulate GDIPlus within GDI . Highly supported.

Dual format: renders as GdiPlus if available, else renders as Gdi if GdiPlus is not available. File size is usually quite large. MS Office and Adobe supported, though large sized fonts tend to be quirky. Test for Adobe support if you want to print to a PDF. Hopefully Microsoft will improve their poor support for this image format.

Renders as GdiPlus only. File size is very small. GdiPlus must be present and this format has limited support. MS Office/Adobe may not fully support. Test thoroughly if using this setting. Hopefully more support will arrive as file-size and image-quality is best within this format.

nEmfDC

PEEDC_DISPLAY_DPI_ADJ (0)

Uses the current video display Device Context. Metafile header is not modified, and DPI of the metafile will match the DPI of the video display. Best if export will only be viewed on a monitor and never printed.

Uses the current default printer driver. This setting may be the best solution if ExportImageDpi will be set to 300 DPI.

bEmfBitmapGradients

If True, file sizes may be large and radial gradients may show artifacts when nEmfType is 0. Linear gradients are well supported. If False and BitmapGradientMode = True, then the background region will be transparent. In this case, it's best to use black or dark colored chart text.

 

This function places the current image, in the form of an enhanced metafile, into a file named by szFileName. It is recommended that ExportImageDPI is set to 300 DPI.

 

Comments

The metafile created is an Enhanced Metafile or Enhanced Plus Metafile (supporting GdiPlus). Standard metafiles are exported with PEcopymetatofile.

 

See Also: PEcopyemftoclipboard, OCX Methods, PEcopyemftofile.