[Table of Contents] [docx version]

WordprocessingML Reference Material - Table of Contents

allowPNG (Allow PNG as Graphic Format)

This element specifies that applications shall allow use of the PNG file format when the contents of this WordprocessingML document are saved as a web page. This includes all supporting images used as part of this HTML web page.

If this element is omitted from the document, then the PNG file format shall not be allowed when this document is saved as a web page, and that another suitable file format (such as the JPEG file format) should be utilized in its place.

[Note: This setting is intended for applications to save web pages which can be supported by legacy web browsers which do not support the reading of PNG images. However, although PNG utilizes a lossless compression algorithm, JPEG uses 'lossy' compression and may in some cases result in lower fidelity images. end note]

[Example: Consider a WordprocessingML document which contains the following content within the web settings part:

<w:webSettings>
<w:allowPNG w:val="true" />
</w:webSettings>

The allowPNG element has a val attribute value of true, which specifies that applications may use the PNG graphic format as needed when saving this WordprocessingML document as a web page. end example]

Parent Elements

webSettings2.15.2.44)

 

Attributes

Description

val (On/Off Value)

Specifies a binary value for the property defined by the parent XML element.

 

A value of on, 1, or true specifies that the property shall be explicitly applied. This is the default value for this attribute, and is implied when the parent element is present, but this attribute is omitted.

 

A value of off, 0, or false specifies that the property shall be explicitly turned off.

 

[Example: For example, consider the following on/off property:

 

<w:… w:val="off"/>

 

The val attribute explicitly declares that the property is turned off. end example]

 

The possible values for this attribute are defined by the ST_OnOff simple type2.18.67).

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_OnOff">

   <attribute name="val" type="ST_OnOff"/>

</complexType>