AllowPNG Class
Allow PNG as Graphic Format.When the object is serialized out as xml, its qualified name is w:allowPNG.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlLeafElement
DocumentFormat.OpenXml.Wordprocessing.OnOffType
DocumentFormat.OpenXml.Wordprocessing.AllowPNG
Namespace: DocumentFormat.OpenXml.Wordprocessing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
Public Class AllowPNG _
Inherits OnOffType
'Usage
Dim instance As AllowPNG
public class AllowPNG : OnOffType
Remarks
[ISO/IEC 29500-1 1st Edition]
17.15.2.1 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 can 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 can use the PNG graphic format as needed when saving this WordprocessingML document as a web page. end example]
Parent Elements |
---|
webSettings (§17.15.2.46) |
This element’s content model is defined by the common boolean property definition in §17.17.4.
© ISO/IEC29500: 2008.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.