Поделиться через


PixelsPerInch Class

Pixels per Inch for Graphics/Images.When the object is serialized out as xml, its qualified name is w:pixelsPerInch.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.PixelsPerInch

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Декларация
Public Class PixelsPerInch _
    Inherits OpenXmlLeafElement
'Применение
Dim instance As PixelsPerInch
public class PixelsPerInch : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 редакция 1]

17.15.2.34 pixelsPerInch (Pixels per Inch for Graphics/Images)

This element specifies the number of pixels per inch (or density) that is used for the display of pictures or table cells when a WordprocessingML document is saved as a web page. The size that is specified by this element affects the size of the pictures or table cells relative to the size of text in the document. The pixels per inch (ppi) measurement is relative to the screen resolution, and the resulting physical dimensions of the resulting image or cell in pixels (which are used in web pages, but not for printed documents) are the result of the original dimensions (in inches) multiplied by the number of pixels per inch.

The range of values for this element is typically from 19 to 480 pixels per inch. The common settings for popular screen sizes are 72, 96, and 120 pixels per inch.

If this element is omitted, then a default size of 96 pixels per inch shall be used when determining the number of pixels for images and/or table cells within this document.

[Note: This setting is typically only specified if the target screen resolution for the web page is known, as defined by the targetScreenSz element (§17.15.2.42) to set the optimum screen size for the web page. end note]

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

<w:webSettings>
<w:pixelsPerInch w:val="200" />
</w:webSettings>

The pixelsPerInch element's val attribute has a value of 200, which specifies that all inches to pixels conversions done when saving this web page must be done assuming a transformation of 200 pixels per inch. end example]

Parent Elements

webSettings (§17.15.2.46)

Attributes

Description

val (Decimal Number Value)

Specifies that the contents of this attribute contains a decimal number.

The contents of this decimal number are interpreted based on the context of the parent XML element.

[Example: Consider the following numeric WordprocessingML property of simple type ST_DecimalNumber:

<… w:val="1512645511" />

The value of the val attribute is a decimal number whose value must be interpreted in the context of the parent element. end example]

The possible values for this attribute are defined by the ST_DecimalNumber simple type (§17.18.10).

[Note: The W3C XML Schema definition of this element's content model (CT_DecimalNumber) is located in §A.1. end note]

© ISO/IEC29500: 2008. Приведенный выше текст переведен с английского языка на русский корпорацией Майкрософт (или ее подрядчиками) и ISO не несет ответственности за эти переводы.

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.

See Also

Reference

PixelsPerInch Members

DocumentFormat.OpenXml.Wordprocessing Namespace