EmfMetafileHeader

Inheritance: java.lang.Object, com.aspose.imaging.fileformats.emf.MetaObject, com.aspose.imaging.fileformats.emf.emf.records.EmfRecord

public class EmfMetafileHeader extends EmfRecord

The EMR_HEADER record types define the starting points of EMF metafiles and specify properties of the device on which the image in the metafile was created. The information in the header record makes it possible for EMF metafiles to be independent of any specific output device. The value of the Size field can be used to distinguish between the different EMR_HEADER record types listed earlier in this section. There are three possible headers: The base header, which is the EmfMetafileHeader record. The fixed-size part of this header is 88 bytes, and it contains a Header object. The first extension header, which is the EmfMetafileHeaderExtension1 record. The fixed-size part of this header is 100 bytes, and it contains a Header object and a HeaderExtension1 object (section 2.2.10). The second extension header, which is the EmfMetafileHeaderExtension2 record. The fixed-size part of this header is 108 bytes, and it contains a Header object, a HeaderExtension1 object, and a HeaderExtension2 object (section 2.2.11).

Constructors

ConstructorDescription
EmfMetafileHeader(EmfRecord record)Initializes a new instance of the EmfMetafileHeader class.
EmfMetafileHeader()Initializes a new instance of the EmfMetafileHeader class.
EmfMetafileHeader(EmfMetafileHeader header)Initializes a new instance of the EmfMetafileHeader class.

Methods

MethodDescription
getEmfHeader()Gets a Header object (section 2.2.9), which contains information about the content and structure of the metafile
setEmfHeader(EmfHeaderObject value)Sets a Header object (section 2.2.9), which contains information about the content and structure of the metafile
getEmfHeaderRecordBuffer()Gets an optional array of bytes that contains the remainder of the EMF header record.
setEmfHeaderRecordBuffer(byte[] value)Sets an optional array of bytes that contains the remainder of the EMF header record.
getEmfDescriptionBuffer()Gets the EMF description buffer An optional array of bytes that contains the EMF description string, which is not required to be contiguous with the fixed portion of the EmfMetafileHeader record.
setEmfDescriptionBuffer(byte[] value)Sets the EMF description buffer An optional array of bytes that contains the EMF description string, which is not required to be contiguous with the fixed portion of the EmfMetafileHeader record.
getEmfDescription()Gets the EMF description An optional, null-terminated Unicode UTF16-LE string of arbitrary length and content.
setEmfDescription(String value)Sets the EMF description An optional, null-terminated Unicode UTF16-LE string of arbitrary length and content.

EmfMetafileHeader(EmfRecord record)

public EmfMetafileHeader(EmfRecord record)

Initializes a new instance of the EmfMetafileHeader class.

Parameters:

ParameterTypeDescription
recordEmfRecordThe record.

EmfMetafileHeader()

public EmfMetafileHeader()

Initializes a new instance of the EmfMetafileHeader class.

EmfMetafileHeader(EmfMetafileHeader header)

public EmfMetafileHeader(EmfMetafileHeader header)

Initializes a new instance of the EmfMetafileHeader class.

Parameters:

ParameterTypeDescription
headerEmfMetafileHeaderThe header.

getEmfHeader()

public EmfHeaderObject getEmfHeader()

Gets a Header object (section 2.2.9), which contains information about the content and structure of the metafile

Returns: EmfHeaderObject

setEmfHeader(EmfHeaderObject value)

public void setEmfHeader(EmfHeaderObject value)

Sets a Header object (section 2.2.9), which contains information about the content and structure of the metafile

Parameters:

ParameterTypeDescription
valueEmfHeaderObject

getEmfHeaderRecordBuffer()

public byte[] getEmfHeaderRecordBuffer()

Gets an optional array of bytes that contains the remainder of the EMF header record. The size of this field MUST be a multiple of 4 bytes

Returns: byte[]

setEmfHeaderRecordBuffer(byte[] value)

public void setEmfHeaderRecordBuffer(byte[] value)

Sets an optional array of bytes that contains the remainder of the EMF header record. The size of this field MUST be a multiple of 4 bytes

Parameters:

ParameterTypeDescription
valuebyte[]

getEmfDescriptionBuffer()

public byte[] getEmfDescriptionBuffer()

Gets the EMF description buffer An optional array of bytes that contains the EMF description string, which is not required to be contiguous with the fixed portion of the EmfMetafileHeader record. Accordingly, the field in this buffer that is labeled “UndefinedSpace” is optional and MUST be ignored.

Returns: byte[]

setEmfDescriptionBuffer(byte[] value)

public void setEmfDescriptionBuffer(byte[] value)

Sets the EMF description buffer An optional array of bytes that contains the EMF description string, which is not required to be contiguous with the fixed portion of the EmfMetafileHeader record. Accordingly, the field in this buffer that is labeled “UndefinedSpace” is optional and MUST be ignored.

Parameters:

ParameterTypeDescription
valuebyte[]

getEmfDescription()

public String getEmfDescription()

Gets the EMF description An optional, null-terminated Unicode UTF16-LE string of arbitrary length and content. Its location in the record and number of characters are specified by the offDescription and nDescription fields, respectively, in EmfHeader. If the value of either field is zero, no description string is present.

Returns: java.lang.String

setEmfDescription(String value)

public void setEmfDescription(String value)

Sets the EMF description An optional, null-terminated Unicode UTF16-LE string of arbitrary length and content. Its location in the record and number of characters are specified by the offDescription and nDescription fields, respectively, in EmfHeader. If the value of either field is zero, no description string is present.

Parameters:

ParameterTypeDescription
valuejava.lang.String